Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dave Taht
committed
Jan 23, 2014
1 parent
d2d75c8
commit d1911de
Showing
1 changed file
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
#!/bin/sh /etc/rc.common | ||
# Copyright (C) 2006 OpenWrt.org | ||
# Copyright (C) 2006-2011 OpenWrt.org | ||
|
||
START=50 | ||
PROG=/usr/sbin/lighttpd | ||
CONFIGFILE=/etc/lighttpd/cerowrt.conf | ||
LOGDIR=/var/log/lighttpd | ||
USE_PROCD=1 | ||
|
||
BIN=lighttpd | ||
DEFAULT=/etc/default/cerowrt | ||
LOG_D=/var/log/cerowrt | ||
RUN_D=/var/run | ||
PID_F=$RUN_D/cerowrt.pid | ||
OPTIONS="-f /etc/lighttpd/cerowrt.conf" | ||
start_service() { | ||
mkdir -m 0755 -p $LOGDIR | ||
|
||
start() { | ||
[ -f $DEFAULT ] && . $DEFAULT | ||
mkdir -p $LOG_D | ||
mkdir -p $RUN_D | ||
$BIN $OPTIONS | ||
} | ||
procd_open_instance | ||
procd_set_param command $PROG -D -f $CONFIGFILE | ||
procd_set_param file $CONFIGFILE | ||
procd_set_param respawn | ||
procd_close_instance | ||
|
||
stop() { | ||
[ -f $PID_F ] && kill $(cat $PID_F) | ||
} | ||
|