X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fscripts%2Finit.d%2Fhelm-uwobo_mowgli;h=bcdb46983f4fe04a05bbfc1dd0ae389667509f07;hb=6dc5a75359bd858a997c6f190e35e3c048bf7197;hp=0ea0121f576e59cecbaadd87618714959cd42811;hpb=2eb348b58e46736bb00d91d47e51c3475054ed64;p=helm.git diff --git a/helm/scripts/init.d/helm-uwobo_mowgli b/helm/scripts/init.d/helm-uwobo_mowgli index 0ea0121f5..bcdb46983 100755 --- a/helm/scripts/init.d/helm-uwobo_mowgli +++ b/helm/scripts/init.d/helm-uwobo_mowgli @@ -4,36 +4,43 @@ # # by --Zack # Created: Wed, 15 Jan 2003 15:14:07 +0100 -# Last-Modified: Wed, 15 Jan 2003 15:14:07 +0100 +# Last-Modified: Fri, 16 Apr 2004 17:54:54 +0200 -DAEMON="/projects/helm/uwobo_mowgli/uwobo" +DAEMON="/projects/helm/daemons/uwobo/uwobo.opt" USAGE="Usage: /etc/init.d/helm-uwobo_mowgli { start | stop | restart }" -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` -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 "done!" + echo -n "Waiting for UWOBO to startup (2 seconds) ... " + sleep 2 + echo "done!" /etc/init.d/helm-tomcat_mowgli start + echo -n "Starting $DAEMON respawner" + /etc/init.d/daemon_respawner.sh -p $PIDFILE \ -m root@localhost \ + -r http://localhost:58080/help -d `basename $0` & + echo "." } do_stop () { - echo "Stopping $DAEMON ..." + echo -n "Stopping $DAEMON respawner" + /etc/init.d/daemon_respawner.sh -d `basename $0` -s + echo "." + echo -n "Stopping $DAEMON ... " start-stop-daemon --stop --pidfile $PIDFILE && \ (if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi) + echo "done!" } case "$1" in