meta-openembedded/meta-webserver/recipes-httpd/monkey/files/monkey.init
Eduardo Silva 74b25f0446 monkey: new v1.5.1 release.
This patch add the minor release fix of Monkey HTTP Server v1.5.1. It fixes
some problems when switching user when started as root.

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-08-01 14:25:01 +02:00

35 lines
613 B
Bash

#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/monkey
NAME=monkey
DESC="Monkey HTTP Server"
OPTS="--daemon"
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start -x "$DAEMON" -- $OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop -x "$DAEMON"
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop -x "$DAEMON"
sleep 1
start-stop-daemon --start -x "$DAEMON" -- $OPTS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0