diff options
Diffstat (limited to 'www/apache2/files/apache.sh')
-rw-r--r-- | www/apache2/files/apache.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/www/apache2/files/apache.sh b/www/apache2/files/apache.sh index 22b785949d8..a6b818f8103 100644 --- a/www/apache2/files/apache.sh +++ b/www/apache2/files/apache.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: apache.sh,v 1.3 2002/04/13 21:35:51 jlam Exp $ +# $NetBSD: apache.sh,v 1.3.2.1 2002/08/25 21:22:08 jlam Exp $ # # PROVIDE: apache # REQUIRE: DAEMON @@ -19,13 +19,16 @@ rcvar=$name command="@PREFIX@/sbin/httpd" ctl_command="@PREFIX@/sbin/apachectl" required_files="@PKG_SYSCONFDIR@/httpd.conf" +extra_commands="reload" start_cmd="apache_doit start" 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, # @@ -33,17 +36,22 @@ restart_cmd="apache_doit restart" # and "startssl", and defaults to "start". # apache_start=start +if [ -f @PKG_SYSCONFDIR@/apache_start.conf ] +then + . @PKG_SYSCONFDIR@/apache_start.conf +fi apache_doit () { case $1 in start) action=${apache_start} ;; + reload) action=graceful ;; *) action=$1 ;; esac ${ctl_command} ${action} } -if [ -f /etc/rc.subr ] +if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] then load_rc_config $name run_rc_command "$1" |