blob: e9e8524ca8ad224742ec70f58bd1ef90534a76c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
#
# Start/stop the mongoose HTTP server
#
set -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=mongoose
DESC="Mongoose HTTP server"
DAEMON=`which mongoose`
OPTIONS="-max_threads 3 -root /var/www -ports 80"
[ -e /etc/default/mongoose ] && . /etc/default/mongoose
case "$1" in
start)
echo "Starting $DESC:"
start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon -K -x "$DAEMON"
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon -K -x "$DAEMON"
start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
|