#!/bin/sh

##
# Apache HTTP Server
##

. /etc/rc.common

StartService ()
{
    if [ "${WEBSERVER:=-NO-}" = "-YES-" ]; then
	ConsoleMessage "Starting Apache web server"
	apachectl start
    fi
}

StopService ()
{
    ConsoleMessage "Stopping Apache web server"
    apachectl stop
}

RestartService ()
{
    if [ "${WEBSERVER:=-NO-}" = "-YES-" ]; then
	ConsoleMessage "Restarting Apache web server"
	apachectl restart
    else
	StopService
    fi
}

RunService "$1"
