summaryrefslogtreecommitdiffstats
path: root/package/mongoose/S85mongoose
blob: 98e537fd62bc38258cf6432ea166696d1cbb9bcb (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="-document_root /var/www -listening_port 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"
	sleep 1
	start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
	echo "$NAME."
	;;
  *)
	echo "Usage: $0 {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0
OpenPOWER on IntegriCloud