buildrootschalter/package/mongoose/S85mongoose
Davide Viti 12da132c2b mongoose: S85mongoose: fix default options
mongoose fails to start because the options used are not supported by
mongoose. Fix it by using the correct option names instead.

[Peter: reworded commit text and use the correct long options instead]
Signed-off-by: Davide Viti <d.viti@infosolution.it>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-25 10:41:19 +01:00

42 lines
760 B
Bash
Executable File

#!/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="-num_threads 3 -document_root /var/www -listening_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