3 # lighttpd lighttpd Web Server
6 # description: lighttpd is a World Wide Web server. It is used to serve \
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
17 [ -f /etc/sysconfig/lighttpd ] && . /etc/sysconfig/lighttpd
19 # Check that networking is up.
20 if is_yes "${NETWORKING}"; then
21 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
22 # nls "ERROR: Networking is down. %s can't be run." <service>
23 msg_network_down lighttpd
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/lighttpd ]; then
37 daemon lighttpd -f /etc/lighttpd/lighttpd.conf $HTTPD_OPTS
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lighttpd
41 msg_already_running lighttpd
46 if [ -f /var/lock/subsys/lighttpd ]; then
49 rm -f /var/lock/subsys/lighttpd >/dev/null 2>&1
51 msg_not_running lighttpd
62 reload|force-reload|graceful)
63 if [ -f /var/lock/subsys/lighttpd ]; then
64 msg_reloading lighttpd
65 killproc lighttpd -HUP
68 msg_not_running lighttpd
73 msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"