57b0396259f77754968f1cb706fdaec77415ae31
[project/luci.git] / libs / sgi-webuci / root / etc / init.d / boa
1 #!/bin/sh /etc/rc.common
2 #
3 #               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
4 #               Modified for Debian GNU/Linux
5 #               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
6 #               Modified for boa by Bill Allombert <ballombe@debian.org>.
7 #               Modified for OpenWRT by Steven Barth <steven@midlink.org>.
8
9 ### BEGIN INIT INFO
10 # Provides:          boa
11 # Required-Start:    $local_fs $remote_fs $network
12 # Required-Stop:     $local_fs $remote_fs $network
13 # Default-Start:     2 3 4 5
14 # Default-Stop:      0 1 6
15 # Short-Description: Boa: lightweight and high performance web server
16 ### END INIT INFO
17
18 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
19 DAEMON=/usr/bin/boa
20 NAME=boa
21 DESC="HTTP server"
22 START=49
23
24 test -x $DAEMON || exit 0
25
26 set -e
27
28 start() {
29         echo -n "Starting $DESC: $NAME"
30         start-stop-daemon -S -q -x $DAEMON
31         echo "."
32 }
33
34 stop() {
35         echo -n "Stopping $DESC: $NAME"
36         start-stop-daemon -K -q -x $DAEMON
37         echo "."
38 }
39
40 restart() {
41         echo -n "Restarting $DESC: $NAME... "
42         start-stop-daemon -K -s HUP -q -x $DAEMON
43         echo "done."
44 }
45
46 reload() {
47         #
48         #       If the daemon can reload its config files on the fly
49         #       for example by sending it SIGHUP, do it here.
50         #
51         #       If the daemon responds to changes in its config file
52         #       directly anyway, make this a do-nothing entry.
53         #
54         echo -n "Reloading $DESC configuration... "
55         start-stop-daemon -K -s 1 -q -x $DAEMON
56         echo "done."
57 }