#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-www/apache/files/apache.rc6,v 1.20 2004/07/15 00:24:42 agriffis Exp $ opts="${opts} reload" depend() { need net use mysql dns logger netmount postgres after sshd } start() { ebegin "Starting apache" env -i PATH=$PATH PERL5LIB=PERL5LIB /sbin/start-stop-daemon -o --quiet \ --start --startas /usr/sbin/apache \ --pidfile /var/run/apache.pid -- ${APACHE_OPTS} eend $? } stop() { ebegin "Stopping apache" /usr/sbin/apachectl stop >/dev/null start-stop-daemon -o --quiet --stop --pidfile /var/run/apache.pid eend $? } reload() { ebegin "Gracefully restarting apache" /usr/sbin/apache -t ${APACHE_OPTS} &>/dev/null if [ "$?" = "0" ] then if [ -f /var/run/apache.pid ] then kill -USR1 $(