summaryrefslogtreecommitdiffstats
path: root/package/lighttpd/S50lighttpd
diff options
context:
space:
mode:
Diffstat (limited to 'package/lighttpd/S50lighttpd')
-rw-r--r--package/lighttpd/S50lighttpd37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/lighttpd/S50lighttpd b/package/lighttpd/S50lighttpd
new file mode 100644
index 0000000000..752402ce42
--- /dev/null
+++ b/package/lighttpd/S50lighttpd
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Starts lighttpd.
+#
+
+start() {
+ echo -n "Starting lighttpd: "
+ start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf
+ echo "OK"
+}
+stop() {
+ echo -n "Stopping lighttpd: "
+ 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 $?
+
OpenPOWER on IntegriCloud