2012-07-22 19:17:48 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Starts lighttpd.
|
|
|
|
#
|
|
|
|
|
|
|
|
start() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting lighttpd: "
|
2012-07-22 19:17:48 +02:00
|
|
|
start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf
|
|
|
|
echo "OK"
|
|
|
|
}
|
|
|
|
stop() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping lighttpd: "
|
2012-07-22 19:17:48 +02:00
|
|
|
start-stop-daemon -K -q -p /var/run/lighttpd.pid
|
|
|
|
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 $?
|
|
|
|
|