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