#!/bin/sh

# See if the daemons are there
test -x /usr/sbin/httpd -a -x /usr/sbin/httpd || exit 0

case "$1" in
	start)
		/sbin/start-stop-daemon --start --quiet --exec /usr/sbin/httpd -- -f /etc/service_conf/httpd.conf
		;;
	stop)
		/bin/killall -1 httpd
		/bin/sleep 1
		/bin/killall -9 httpd
		;;
	reload)
		/usr/sbin/httpd -k graceful -f /etc/service_conf/httpd.conf
		;;
	restart|force-reload)
		$0 stop
		sleep 3
		$0 start
		;;
	*)
		echo "Usage: /etc/init.d/httpd.sh {start|stop|reload|restart|force-reload}"
		exit 1
		;;
esac

exit 0
