summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2002-12-14 06:13:34 +0000
committerDonny Davies <woodchip@gentoo.org>2002-12-14 06:13:34 +0000
commita9be23cced73da4de7629524179c3b218bdba572 (patch)
tree1a4876857d36501e6de3639f25e7bcfe36310b7d /net-www/apache
parent#8738 (diff)
downloadgentoo-2-a9be23cced73da4de7629524179c3b218bdba572.tar.gz
gentoo-2-a9be23cced73da4de7629524179c3b218bdba572.tar.bz2
gentoo-2-a9be23cced73da4de7629524179c3b218bdba572.zip
sync up
Diffstat (limited to 'net-www/apache')
-rw-r--r--net-www/apache/files/2.0.40/apache2.initd24
1 files changed, 14 insertions, 10 deletions
diff --git a/net-www/apache/files/2.0.40/apache2.initd b/net-www/apache/files/2.0.40/apache2.initd
index b5296d7592e6..f732eb00f156 100644
--- a/net-www/apache/files/2.0.40/apache2.initd
+++ b/net-www/apache/files/2.0.40/apache2.initd
@@ -1,11 +1,11 @@
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/apache/files/2.0.40/apache2.initd,v 1.3 2002/11/28 20:23:09 woodchip Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/apache/files/2.0.40/apache2.initd,v 1.4 2002/12/14 06:13:34 woodchip Exp $
depend() {
need net
- use mysql named
+ use mysql dns logger
}
start() {
@@ -17,16 +17,20 @@ start() {
stop() {
ebegin "Stopping apache2"
- /usr/sbin/apache2 -k stop ${APACHE2_OPTS}; sleep 1
+ /usr/sbin/apache2ctl stop &>/dev/null
start-stop-daemon -o --quiet --stop --pidfile /var/run/apache2.pid
eend $?
}
-restart() {
- ebegin "Reloading apache2"
- svc_stop
- sleep 1
- svc_start
- /usr/sbin/apache2 -k reload ${APACHE2_OPTS}
- eend $?
+svc_restart() {
+ ebegin "Gracefully restarting apache"
+ /usr/sbin/apache2 -t ${APACHE_OPTS} &>/dev/null
+ if [ "$?" != "0" ]; then
+ svc_stop
+ eend 1 "Apache configuration error"
+ else
+ killall -USR1 apache2 &> /dev/null
+ svc_start &>/dev/null
+ eend $?
+ fi
}