summaryrefslogtreecommitdiff
path: root/www/apache6
diff options
context:
space:
mode:
authortv <tv>2002-07-07 00:45:18 +0000
committertv <tv>2002-07-07 00:45:18 +0000
commite9d690f224895586659bd65f8a81e2d59d1bcc05 (patch)
treec724e96ef073d6855cc91736a0cd59bd3b78c0d9 /www/apache6
parentc95181e5b03008a20612798ab86952bd1cc05a9d (diff)
downloadpkgsrc-e9d690f224895586659bd65f8a81e2d59d1bcc05.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.sh9
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