X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fscripts%2Finit.d%2Fhelm-uwobo_mowgli;h=b3ac8431ae7ea2552b5c11417f7c0e6dc36d7e9b;hb=970ba0021a992efe25ec374875dc127ff236cc74;hp=24001cd69b2d47db8edd1b837541582f66206c59;hpb=20754a73006e110f7f67d037cddc4a49f4fb5418;p=helm.git diff --git a/helm/scripts/init.d/helm-uwobo_mowgli b/helm/scripts/init.d/helm-uwobo_mowgli index 24001cd69..b3ac8431a 100755 --- a/helm/scripts/init.d/helm-uwobo_mowgli +++ b/helm/scripts/init.d/helm-uwobo_mowgli @@ -4,10 +4,11 @@ # # by --Zack # Created: Wed, 15 Jan 2003 15:14:07 +0100 -# Last-Modified: Fri, 17 Jan 2003 16:46:41 +0100 +# Last-Modified: Tue, 8 Apr 2003 09:43:08 +0200 zacchiro -DAEMON="/projects/helm/uwobo_mowgli/uwobo" +DAEMON="/projects/helm/daemons/uwobo/uwobo" 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 @@ -20,22 +21,36 @@ fi . $ENVSCRIPT &> /dev/null NAME=`basename $DAEMON` -PIDFILE=/projects/helm/run/"$NAME"_mowgli.pid +# Warning: $PIDFILE value is shared by UWOBO respawner, change at your own risk +PIDFILE=/var/run/"$NAME"_mowgli.pid do_start () { - echo "Starting $DAEMON ..." + echo -n "Starting $DAEMON ... " start-stop-daemon \ --start --background --pidfile $PIDFILE --make-pidfile \ --chuid $OWNER --exec $DAEMON - echo "Waiting for UWOBO to startup (2 seconds) ..." + echo "done!" + echo -n "Waiting for UWOBO to startup (2 seconds) ... " sleep 2 + echo "done!" /etc/init.d/helm-tomcat_mowgli start + echo -n "Starting UWOBO respawner (uwobo_forever.sh) ... " + if [ -x "$UWOBO_FOREVER" ]; then + $UWOBO_FOREVER & + echo "done!" + else + echo "Can't find $UWOBO_FOREVER :-(" + fi } 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