#!/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 }