2007-08-12 01:35:07 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Starts lighttpd
|
|
|
|
#
|
|
|
|
|
|
|
|
umask 077
|
|
|
|
|
|
|
|
start() {
|
|
|
|
echo -n "Starting lighttpd: "
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -S -q -m -p /var/run/lighttpd.pid -b -x /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf -D
|
2007-08-12 01:35:07 +02:00
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
stop() {
|
|
|
|
echo -n "Stopping lighttpd: "
|
2008-03-18 01:20:24 +01:00
|
|
|
start-stop-daemon -K -q -p /var/run/lighttpd.pid
|
2007-08-12 01:35:07 +02:00
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
restart() {
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
restart
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
|