summaryrefslogtreecommitdiff
path: root/www/apache6
diff options
context:
space:
mode:
authorjlam <jlam>2001-05-14 21:28:33 +0000
committerjlam <jlam>2001-05-14 21:28:33 +0000
commit69958568a0e06a9cd51cee6d8e1d801c6e451211 (patch)
tree6f209d6854b6f1f31bbec505e874edd985e086a6 /www/apache6
parentec60e99d199664ad16b228fa3d0867f16872b83d (diff)
downloadpkgsrc-69958568a0e06a9cd51cee6d8e1d801c6e451211.tar.gz
Mirror changes in www/apache/files/apache.sh.
Diffstat (limited to 'www/apache6')
-rw-r--r--www/apache6/files/apache.sh32
1 files changed, 23 insertions, 9 deletions
diff --git a/www/apache6/files/apache.sh b/www/apache6/files/apache.sh
index 870057d3638..3f8f7bcd242 100644
--- a/www/apache6/files/apache.sh
+++ b/www/apache6/files/apache.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: apache.sh,v 1.8 2001/05/08 18:13:52 jlam Exp $
+# $NetBSD: apache.sh,v 1.9 2001/05/14 21:28:33 jlam Exp $
#
# PROVIDE: apache
# REQUIRE: DAEMON
@@ -13,12 +13,27 @@ name="apache"
rcvar=$name
command="@PREFIX@/sbin/apachectl"
+apache_start=start
if [ -f @APACHE_SYSCONFDIR@/apache_start.conf ]
then
# This file can reset apache_start to "startssl"
. @APACHE_SYSCONFDIR@/apache_start.conf
fi
+# set defaults
+if [ -r /etc/rc.conf ]
+then
+ . /etc/rc.conf
+else
+ eval ${rcvar}=YES
+fi
+
+# $flags from environment overrides ${rcvar}_flags
+if [ -n "${flags}" ]
+then
+ eval ${rcvar}_flags="${flags}"
+fi
+
apache_doit()
{
action=$1
@@ -29,7 +44,7 @@ apache_doit()
restart) echo -n "Restarting ${name}: " ;;
esac
- ${command} ${command_args} ${action}
+ ${command} ${apache_flags} ${command_args} ${action}
}
checkyesno()
@@ -45,17 +60,16 @@ checkyesno()
esac
}
-if [ -r /etc/rc.conf ]
-then
- . /etc/rc.conf
-else
+cmd=${1:-start}
+case ${cmd} in
+force*)
+ cmd=${cmd#force}
eval ${rcvar}=YES
-fi
+ ;;
+esac
if checkyesno ${rcvar}
then
- cmd=${1:-start}
-
if [ -x ${command} ]
then
case ${cmd} in