48 lines
679 B
Plaintext
48 lines
679 B
Plaintext
#!/sbin/runscript
|
|
#
|
|
command=/usr/sbin/apachectl
|
|
pidfile=/var/run/httpd/httpd.pid
|
|
extra_commands="reload"
|
|
describe="The Apache HTTP server"
|
|
|
|
depend()
|
|
{
|
|
need localmount
|
|
provide httpd
|
|
}
|
|
|
|
start()
|
|
{
|
|
if [ ! -d /var/run/httpd ]; then
|
|
mkdir -p /var/run/httpd
|
|
fi
|
|
if [ ! -d /var/log/httpd ]; then
|
|
mkdir -p /var/log/httpd
|
|
fi
|
|
|
|
ebegin "Starting Apache HTTP server"
|
|
${command} start >/dev/null
|
|
eend $?
|
|
}
|
|
|
|
stop()
|
|
{
|
|
ebegin "Stopping Apache HTTP server"
|
|
${command} stop >/dev/null
|
|
eend $?
|
|
}
|
|
|
|
restart()
|
|
{
|
|
ebegin "Restarting Apache HTTP server"
|
|
${command} restart >/dev/null
|
|
eend $?
|
|
}
|
|
|
|
reload()
|
|
{
|
|
ebegin "Restarting Apache gracefully"
|
|
${command} graceful >/dev/null
|
|
eend $?
|
|
}
|