summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/apache/files/apache.sh5
-rw-r--r--www/apache2/files/apache.sh12
-rw-r--r--www/apache6/files/apache.sh9
3 files changed, 20 insertions, 6 deletions
diff --git a/www/apache/files/apache.sh b/www/apache/files/apache.sh
index 6c12754c9be..afe01833999 100644
--- a/www/apache/files/apache.sh
+++ b/www/apache/files/apache.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: apache.sh,v 1.19 2002/07/02 11:57:19 wiz Exp $
+# $NetBSD: apache.sh,v 1.20 2002/07/07 00:45:18 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,6 +45,7 @@ apache_doit ()
{
case $1 in
start) action=${apache_start} ;;
+ reload) action=graceful ;;
*) action=$1 ;;
esac
${ctl_command} ${action}
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"
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