init script cleanup, use /etc/rc.d/ for enabled scripts, /etc/init.d/<pkgname> (enabl...
[openwrt/svn-archive/archive.git] / net / lighttpd / files / lighttpd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3
4 BIN=lighttpd
5 DEFAULT=/etc/default/$BIN
6 LOG_D=/var/log/$BIN
7 RUN_D=/var/run
8 PID_F=$RUN_D/$BIN.pid
9
10 start() {
11 [ -f $DEFAULT ] && . $DEFAULT
12 mkdir -p $LOG_D
13 mkdir -p $RUN_D
14 $BIN $OPTIONS
15 }
16
17 stop() {
18 [ -f $PID_F ] && kill $(cat $PID_F)
19 }
20