blob: f732eb00f15665edc380ad19e412646144adbc05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/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.4 2002/12/14 06:13:34 woodchip Exp $
depend() {
need net
use mysql dns logger
}
start() {
ebegin "Starting apache2"
start-stop-daemon --quiet --start --startas /usr/sbin/apache2 \
--pidfile /var/run/apache2.pid -- -k start ${APACHE2_OPTS}
eend $?
}
stop() {
ebegin "Stopping apache2"
/usr/sbin/apache2ctl stop &>/dev/null
start-stop-daemon -o --quiet --stop --pidfile /var/run/apache2.pid
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
}
|