#! /bin/sh
DAEMON=/bin/boa

. /etc/init.d/functions.sh
. /etc/conf.d/httpd

case "$1" in
	start)
		begin "Starting web server"
		start_daemon $DAEMON $BOA_OPTIONS
		end $?
		;;
	stop)
		begin "Stopping web server"
		stop_daemon $DAEMON
		end $?
		;;
	restart)
		begin "Restarting web server"
		stop_daemon $DAEMON && start_daemon $DAEMON $BOA_OPTIONS
		end $?
		;;
	force-reload)
		begin "Reloading web server"
		killall -HUP boa || {
			stop_daemon $DAEMON && start_daemon $DAEMON $BOA_OPTIONS
		}
		end $?
		;;
	*)
		error "Usage: $0 start|stop|restart|force-reload"
		;;
esac
