summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/apache22/Makefile4
-rw-r--r--www/apache22/files/apache.sh68
2 files changed, 36 insertions, 36 deletions
diff --git a/www/apache22/Makefile b/www/apache22/Makefile
index 4ce2eb8ae77..b59d063313c 100644
--- a/www/apache22/Makefile
+++ b/www/apache22/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.38 2009/02/05 16:39:18 sborrill Exp $
+# $NetBSD: Makefile,v 1.39 2009/02/25 15:39:38 tron Exp $
DISTNAME= httpd-2.2.11
-PKGREVISION= 1
+PKGREVISION= 2
PKGNAME= ${DISTNAME:S/httpd/apache/}
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE:=httpd/} \
diff --git a/www/apache22/files/apache.sh b/www/apache22/files/apache.sh
index 096338198bb..b59c03e44bf 100644
--- a/www/apache22/files/apache.sh
+++ b/www/apache22/files/apache.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: apache.sh,v 1.2 2008/10/12 12:22:25 tron Exp $
+# $NetBSD: apache.sh,v 1.3 2009/02/25 15:39:38 tron Exp $
#
# PROVIDE: apache
# REQUIRE: DAEMON
@@ -12,48 +12,48 @@
# apache_start="start" # set to "startssl" to allow HTTPS connections;
# # this variable is optional
+name="apache"
+
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
-fi
-
-name="apache"
-rcvar=$name
-command="@PREFIX@/sbin/httpd"
-pidfile="/var/run/httpd.pid"
-ctl_command="@PREFIX@/sbin/apachectl"
-required_files="@PKG_SYSCONFDIR@/httpd.conf"
-extra_commands="reload"
-start_cmd="apache_doit start"
-stop_cmd="apache_doit stop"
-reload_cmd="apache_doit reload"
-apache_doit ()
-{
- : ${apache_start:=start}
+ rcvar=$name
+ command="@PREFIX@/sbin/httpd"
+ command_args="-k start"
+ pidfile="@VARBASE@/run/httpd.pid"
+ required_files="@PKG_SYSCONFDIR@/httpd.conf"
+ extra_commands="reload"
+ reload_cmd="$command -k graceful"
- case $1 in
- start) action=${apache_start} ;;
- reload) action=graceful ;;
- *) action=$1 ;;
- esac
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ ctl_command="@PREFIX@/sbin/apachectl"
if [ ! -x ${ctl_command} ]; then
return
fi
- case ${action} in
- start|startssl) @ECHO@ "Starting ${name}." ;;
- stop) @ECHO@ "Stopping ${name}." ;;
+ case "$1" in
+ start)
+ @ECHO@ "Starting ${name}."
+ ${ctl_command} start
+ ;;
+ stop)
+ @ECHO@ "Stopping ${name}."
+ ${ctl_command} stop
+ ;;
+ reload)
+ ${ctl_command} graceful
+ ;;
+ restart)
+ "$0" stop
+ sleep 10
+ "$0" start
+ ;;
+ *)
+ ${ctl_command} "$1"
+ ;;
esac
-
- ${ctl_command} ${action}
-}
-
-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
- apache_doit "$1"
fi