aboutsummaryrefslogtreecommitdiffstats
path: root/package/lighttpd/files/lighttpd.init
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-05-16 18:41:16 +0000
committerNicolas Thill <nico@openwrt.org>2005-05-16 18:41:16 +0000
commit12ed01d836407ddef7dd449c87a9dc8655d983f5 (patch)
tree53fcae1a01acbe0a5a2816ef2260f6c3c295e962 /package/lighttpd/files/lighttpd.init
parentda6c1247933d1659e26d448aa9900909271b3a23 (diff)
downloadupstream-12ed01d836407ddef7dd449c87a9dc8655d983f5.tar.gz
upstream-12ed01d836407ddef7dd449c87a9dc8655d983f5.tar.bz2
upstream-12ed01d836407ddef7dd449c87a9dc8655d983f5.zip
Add lighttpd package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@917 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/lighttpd/files/lighttpd.init')
-rw-r--r--package/lighttpd/files/lighttpd.init24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/lighttpd/files/lighttpd.init b/package/lighttpd/files/lighttpd.init
new file mode 100644
index 0000000000..ca7a3f97f5
--- /dev/null
+++ b/package/lighttpd/files/lighttpd.init
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+BIN=lighttpd
+DEFAULT=/etc/default/$BIN
+LOG_D=/var/log/$BIN
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN.pid
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ mkdir -p $LOG_D
+ mkdir -p $RUN_D
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F)
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?