3 # init.d script for http_getter
5 # by --Zack <zack@cs.unibo.it>
6 # Created: Wed, 15 Jan 2003 15:14:07 +0100
7 # Last-Modified: Tue, 8 Apr 2003 09:43:08 +0200 zacchiro
9 DAEMON="/projects/helm/uwobo_mowgli/uwobo"
10 USAGE="Usage: /etc/init.d/helm-uwobo_mowgli { start | stop | restart }"
11 UWOBO_FOREVER="/etc/init.d/uwobo_forever.sh"
14 if [ -f /etc/default/helm_mowgli ]; then
15 . /etc/default/helm_mowgli
17 if ! [ -f "$ENVSCRIPT" ]; then
18 echo "Can't find environment script '$ENVSCRIPT'"
21 . $ENVSCRIPT &> /dev/null
23 NAME=`basename $DAEMON`
24 # Warning: $PIDFILE value is shared by UWOBO respawner, change at your own risk
25 PIDFILE=/projects/helm/run/"$NAME"_mowgli.pid
28 echo -n "Starting $DAEMON ... "
30 --start --background --pidfile $PIDFILE --make-pidfile \
31 --chuid $OWNER --exec $DAEMON
33 echo -n "Waiting for UWOBO to startup (2 seconds) ... "
36 /etc/init.d/helm-tomcat_mowgli start
37 echo -n "Starting UWOBO respawner (uwobo_forever.sh) ... "
38 if [ -x "$UWOBO_FOREVER" ]; then
42 echo "Can't find $UWOBO_FOREVER :-("
47 echo -n "Stopping $DAEMON ... "
48 start-stop-daemon --stop --pidfile $PIDFILE && \
49 (if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi)
51 echo -n "Stopping UWOBO respawner (uwobo_forever.sh) ... "
52 killall `basename $UWOBO_FOREVER`