Start LuCIttpd in background
[project/luci.git] / libs / lucittpd / root / etc / init.d / lucittpd
1 #!/bin/sh /etc/rc.common
2 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
3 DAEMON=/usr/bin/lucittpd
4 NAME=lucittpd
5 DESC="HTTP server"
6 START=49
7
8 test -x $DAEMON || exit 0
9 set -e
10
11 start() {
12         echo -n "Starting $DESC: $NAME"
13         start-stop-daemon -b -S -q -x $DAEMON
14         echo "."
15 }
16
17 stop() {
18         echo -n "Stopping $DESC: $NAME"
19         start-stop-daemon -K -q -x $DAEMON
20         echo "."
21 }
22
23 restart() {
24         # echo -n "Restarting $DESC: $NAME... "
25         # start-stop-daemon -K -s HUP -q -x $DAEMON
26         # echo "done."
27         stop
28         sleep 3
29         start
30 }
31
32 reload() {
33         #
34         #       If the daemon can reload its config files on the fly
35         #       for example by sending it SIGHUP, do it here.
36         #
37         #       If the daemon responds to changes in its config file
38         #       directly anyway, make this a do-nothing entry.
39         #
40         # echo -n "Reloading $DESC configuration... "
41         # start-stop-daemon -K -s 1 -q -x $DAEMON
42         # echo "done."
43         restart
44 }