diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-07-22 19:17:48 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-07-22 19:17:48 +0200 |
commit | ccda74f3c72d1c8809ee171e39a7712b23a03dc2 (patch) | |
tree | ef8953d6853340b79a34cbad17533ae9a1b87910 /package/lighttpd/S50lighttpd | |
parent | 853545c835e819c689862e8941f7d7c1a8bb4be0 (diff) | |
download | buildroot-novena-ccda74f3c72d1c8809ee171e39a7712b23a03dc2.tar.gz buildroot-novena-ccda74f3c72d1c8809ee171e39a7712b23a03dc2.zip |
lighttpd: add simple startup script
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/lighttpd/S50lighttpd')
-rw-r--r-- | package/lighttpd/S50lighttpd | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/package/lighttpd/S50lighttpd b/package/lighttpd/S50lighttpd new file mode 100644 index 000000000..752402ce4 --- /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 $? + |