summaryrefslogtreecommitdiff
path: root/www/apache2
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2002-07-07 00:45:18 +0000
committertv <tv@pkgsrc.org>2002-07-07 00:45:18 +0000
commitd84b6cc3f9cf61cab13822fef8dbd22affa1c2e7 (patch)
treec724e96ef073d6855cc91736a0cd59bd3b78c0d9 /www/apache2
parentc203c451ba194e48a7957bfd53f727c9787ec555 (diff)
downloadpkgsrc-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/apache2')
-rw-r--r--www/apache2/files/apache.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/www/apache2/files/apache.sh b/www/apache2/files/apache.sh
index 22b785949d8..d0e23dfd460 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.4 2002/07/07 00:45:19 tv 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"