summaryrefslogtreecommitdiffstats
path: root/projectroot/etc/init.d/lighttpd
diff options
context:
space:
mode:
Diffstat (limited to 'projectroot/etc/init.d/lighttpd')
-rw-r--r--projectroot/etc/init.d/lighttpd55
1 files changed, 55 insertions, 0 deletions
diff --git a/projectroot/etc/init.d/lighttpd b/projectroot/etc/init.d/lighttpd
new file mode 100644
index 000000000..24a17e2a0
--- /dev/null
+++ b/projectroot/etc/init.d/lighttpd
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+#
+# lighttpd
+#
+PATH=/usr/bin:/usr/sbin:/bin:/sbin
+
+PREFIX="lighttpd: "
+LIGHTTPD="/usr/sbin/lighttpd"
+LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf"
+
+start()
+{
+ echo "${PREFIX}starting"
+
+ if start-stop-daemon --start --quiet --oknodo --exec ${LIGHTTPD} -- -f ${LIGHTTPD_CONF}; then
+ echo "${PREFIX}done"
+ else
+ echo "${PREFIX}error, could not start server"
+ fi
+}
+
+stop()
+{
+ echo "${PREFIX}stoppping"
+
+ if start-stop-daemon --stop --quiet --oknodo --exec ${LIGHTTPD}; then
+ echo "${PREFIX}done"
+ else
+ echo "${PREFIX}error, could not stop server"
+ fi
+}
+
+case $1 in
+
+ start)
+ start
+ ;;
+
+ stop)
+ stop
+ ;;
+
+ restart|force-reload)
+ stop
+ sleep 1
+ start
+ ;;
+
+ *)
+ echo "${PREFIX}usage: ${0} [start|stop|restart]"
+ exit 1
+ ;;
+
+esac