diff options
author | Charles Manning <cdhmanning@gmail.com> | 2012-12-12 12:03:16 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2013-05-02 22:52:50 +0200 |
commit | c85da87012e1e05364aa27e786bf9152847b5325 (patch) | |
tree | 35fbb81e349223ea0ee8a678521e908df1cdcaf9 /package/mongoose/S85mongoose | |
parent | e9b771283765e74792df6a05775383f6d4da2636 (diff) | |
download | buildroot-novena-c85da87012e1e05364aa27e786bf9152847b5325.tar.gz buildroot-novena-c85da87012e1e05364aa27e786bf9152847b5325.zip |
Add package for mongoose web server
[Peter: drop noauth patch, cleanup Config.in, don't install to staging, ..]
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/mongoose/S85mongoose')
-rwxr-xr-x | package/mongoose/S85mongoose | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/package/mongoose/S85mongoose b/package/mongoose/S85mongoose new file mode 100755 index 000000000..e9e8524ca --- /dev/null +++ b/package/mongoose/S85mongoose @@ -0,0 +1,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 |