diff options
author | tv <tv@pkgsrc.org> | 2002-07-07 00:45:18 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2002-07-07 00:45:18 +0000 |
commit | d84b6cc3f9cf61cab13822fef8dbd22affa1c2e7 (patch) | |
tree | c724e96ef073d6855cc91736a0cd59bd3b78c0d9 /www/apache6 | |
parent | c203c451ba194e48a7957bfd53f727c9787ec555 (diff) | |
download | pkgsrc-d84b6cc3f9cf61cab13822fef8dbd22affa1c2e7.tar.gz |
Provide the common rc.d directive "reload" as an alias for "apachectl graceful",
which reloads the server without killing transfers in progress.
Diffstat (limited to 'www/apache6')
-rw-r--r-- | www/apache6/files/apache.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/www/apache6/files/apache.sh b/www/apache6/files/apache.sh index 5777b3a8bf4..ecd1538c740 100644 --- a/www/apache6/files/apache.sh +++ b/www/apache6/files/apache.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: apache.sh,v 1.13 2002/02/26 20:28:41 jlam Exp $ +# $NetBSD: apache.sh,v 1.14 2002/07/07 00:45:19 tv Exp $ # # PROVIDE: apache # REQUIRE: DAEMON @@ -19,9 +19,11 @@ 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: @@ -43,15 +45,16 @@ 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" else - eval ${start_cmd} + apache_doit "$1" fi |