# Created: Wed, 15 Jan 2003 15:14:07 +0100
# Last-Modified: Tue, 8 Apr 2003 09:43:08 +0200 zacchiro
-DAEMON="/projects/helm/uwobo_mowgli/uwobo"
+DAEMON="/projects/helm/daemons/uwobo/uwobo.opt"
USAGE="Usage: /etc/init.d/helm-uwobo_mowgli { start | stop | restart }"
UWOBO_FOREVER="/etc/init.d/uwobo_forever.sh"
-ENVSCRIPT=""
if [ -f /etc/default/helm_mowgli ]; then
. /etc/default/helm_mowgli
fi
-if ! [ -f "$ENVSCRIPT" ]; then
- echo "Can't find environment script '$ENVSCRIPT'"
- exit 1
-fi
-. $ENVSCRIPT &> /dev/null
NAME=`basename $DAEMON`
# Warning: $PIDFILE value is shared by UWOBO respawner, change at your own risk
-PIDFILE=/projects/helm/run/"$NAME"_mowgli.pid
+PIDFILE=/var/run/"$NAME"_mowgli.pid
do_start () {
echo -n "Starting $DAEMON ... "
}
do_stop () {
- echo "Stopping $DAEMON ..."
+ echo -n "Stopping $DAEMON ... "
start-stop-daemon --stop --pidfile $PIDFILE && \
(if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi)
+ echo "done!"
+ echo -n "Stopping UWOBO respawner (uwobo_forever.sh) ... "
+ killall `basename $UWOBO_FOREVER`
+ echo "done!"
}
case "$1" in