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