updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / lighttpd-svn / lighttpd.rc.d
blob97c315f2813583f95210ec906bd9c35fdce7e7b9
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID=`pidof -o %PPID /usr/sbin/lighttpd`
9 case "$1" in
10 start)
11 stat_busy "Starting lighttpd Daemon"
12 [ -z "$PID" ] && /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf 2>&1
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon lighttpd
17 stat_done
20 stop)
21 stat_busy "Stopping lighttpd Daemon"
22 [ ! -z "$PID" ] && kill $PID &>/dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon lighttpd
27 rm -f /var/run/lighttpd/lighttpd.pid
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac