diff options
author | jlam <jlam> | 2002-11-19 23:08:27 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-11-19 23:08:27 +0000 |
commit | b677e03c59a00e4820fc1a11020703d4fde388b0 (patch) | |
tree | 0c08a2bdb2a0377dd96c22f71a7d0b244245452b /www | |
parent | feb05d05ac5d58bc42c16b665a70f30cf0e2a52f (diff) | |
download | pkgsrc-b677e03c59a00e4820fc1a11020703d4fde388b0.tar.gz |
As per discussion in pkg/18854, remove support for apache_start.conf as
the precedence of the contents of this file changes depending on whether
it's started at boot time or started manually, and it's not really
necessary to add the extra complexity since it's valid (and easier) to just
set apache_start in /etc/rc.conf.
Also make the script more verbose.
Diffstat (limited to 'www')
-rw-r--r-- | www/apache2/files/apache.sh | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/www/apache2/files/apache.sh b/www/apache2/files/apache.sh index e3249b2f71b..893c05e24fa 100644 --- a/www/apache2/files/apache.sh +++ b/www/apache2/files/apache.sh @@ -1,13 +1,16 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: apache.sh,v 1.7 2002/10/14 00:29:51 lukem Exp $ +# $NetBSD: apache.sh,v 1.8 2002/11/19 23:08:27 jlam Exp $ # # PROVIDE: apache # REQUIRE: DAEMON # KEYWORD: shutdown # -# To start apache at startup, copy this script to /etc/rc.d and set -# apache=YES in /etc/rc.conf. +# You will need to set some variables in /etc/rc.conf to start Apache: +# +# apache=YES +# apache_start="start" # set to "startssl" to allow HTTPS connections; +# # this variable is optional if [ -f /etc/rc.subr ] then @@ -25,29 +28,26 @@ stop_cmd="apache_doit stop" restart_cmd="apache_doit restart" reload_cmd="apache_doit reload" -# "${apache_start}" is the subcommand sent to apachectl to control how -# httpd is started. It's value may be overridden in: -# -# @PKG_SYSCONFDIR@/apache_start.conf -# /etc/rc.conf -# /etc/rc.conf.d/apache, -# -# in order of increasing precedence. Its possible values are "start" -# and "startssl", and defaults to "start" unless it's already set. -# -: ${apache_start:=start} -if [ -f @PKG_SYSCONFDIR@/apache_start.conf ] -then - . @PKG_SYSCONFDIR@/apache_start.conf -fi - apache_doit () { + : ${apache_start:=start} + case $1 in start) action=${apache_start} ;; reload) action=graceful ;; *) action=$1 ;; esac + + if [ ! -x ${ctl_command} ]; then + return + fi + + case ${action} in + start|startssl) @ECHO@ "Starting ${name}." ;; + stop) @ECHO@ "Stopping ${name}." ;; + restart) @ECHO@ "Restarting ${name}." ;; + esac + ${ctl_command} ${action} } |