vp-build/srcpkgs/apache/files/apache.rc
Juan RP 501288745a Added apache-2.2.15 build template.
--HG--
extra : convert_revision : 6af8d5066efdc5af0f4e2dd7939b07f9a277d9c4
2010-04-30 16:27:07 +02:00

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 $?
}