501288745a
--HG-- extra : convert_revision : 6af8d5066efdc5af0f4e2dd7939b07f9a277d9c4
47 lines
679 B
Text
47 lines
679 B
Text
#!/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 $?
|
|
}
|