summaryrefslogtreecommitdiffstats
path: root/net/mini_httpd/files/mini_httpd.init
blob: 4e0a3a73f2481d81af90499d523215e7472dd372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50

BIN=mini_httpd
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
[ -f $DEFAULT ] && . $DEFAULT

start() {
	[ -d $RUN_D ] || mkdir -p $RUN_D
	$BIN $OPTIONS 2>/dev/null
}

stop() {
	[ -f $PID_F ] && kill $(cat $PID_F)
}