diff options
author | jlam <jlam@pkgsrc.org> | 2002-02-26 20:28:41 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-02-26 20:28:41 +0000 |
commit | cd8056aeb4c172ced4c6631417bcb9ce89c7a4ad (patch) | |
tree | 634ba5e6865f80b61a5196d9119e799ca20243e2 /www/apache6/files | |
parent | a7185c72fc2db2a497c0184fd090b2ce70133305 (diff) | |
download | pkgsrc-cd8056aeb4c172ced4c6631417bcb9ce89c7a4ad.tar.gz |
Add back ability to change the value of "apache_start" from /etc/rc.conf
that was lost in the previous commit.
"${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".
Diffstat (limited to 'www/apache6/files')
-rw-r--r-- | www/apache6/files/apache.sh | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/www/apache6/files/apache.sh b/www/apache6/files/apache.sh index 74d2fa9abec..5777b3a8bf4 100644 --- a/www/apache6/files/apache.sh +++ b/www/apache6/files/apache.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: apache.sh,v 1.12 2002/02/05 06:04:42 jlam Exp $ +# $NetBSD: apache.sh,v 1.13 2002/02/26 20:28:41 jlam Exp $ # # PROVIDE: apache # REQUIRE: DAEMON @@ -18,23 +18,40 @@ name="apache" rcvar=$name command="@PREFIX@/sbin/httpd" ctl_command="@PREFIX@/sbin/apachectl" +required_files="@PKG_SYSCONFDIR@/httpd.conf" +start_cmd="apache_doit start" +stop_cmd="apache_doit stop" +restart_cmd="apache_doit restart" +# "${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". +# apache_start=start if [ -f @PKG_SYSCONFDIR@/apache_start.conf ] then - # This file can reset apache_start to "startssl" . @PKG_SYSCONFDIR@/apache_start.conf fi -required_files="@PKG_SYSCONFDIR@/httpd.conf" -start_cmd="${ctl_command} ${apache_start}" -stop_cmd="${ctl_command} stop" -restart_cmd="${ctl_command} restart" +apache_doit () +{ + case $1 in + start) action=${apache_start} ;; + *) action=$1 ;; + esac + ${ctl_command} ${action} +} if [ -f /etc/rc.subr ] then load_rc_config $name run_rc_command "$1" else - ${start_cmd} + eval ${start_cmd} fi |