Port mini_sendmail to -ng
[openwrt/svn-archive/archive.git] / net / mini_httpd / files / mini_httpd.init
1 #!/bin/sh
2
3 BIN=mini_httpd
4 DEFAULT=/etc/default/$BIN
5 RUN_D=/var/run
6 PID_F=$RUN_D/$BIN.pid
7 [ -f $DEFAULT ] && . $DEFAULT
8
9 case $1 in
10 start)
11 [ -d $RUN_D ] || mkdir -p $RUN_D
12 $BIN $OPTIONS 2>/dev/null
13 ;;
14 stop)
15 [ -f $PID_F ] && kill $(cat $PID_F)
16 ;;
17 restart)
18 $0 stop
19 $0 start
20 ;;
21 *)
22 echo "usage: $0 (start|stop|restart)"
23 exit 1
24 esac
25
26 exit $?