From 86c7cb1e030964d7d3ca09ac52f7f572b02f1af4 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Fri, 16 Apr 2004 16:39:14 +0000 Subject: [PATCH] use respawner --- helm/scripts/init.d/helm-http-getter | 15 ++++++++++++--- helm/scripts/init.d/helm-search-engine | 15 +++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/helm/scripts/init.d/helm-http-getter b/helm/scripts/init.d/helm-http-getter index e1a7061d8..a6c18ae46 100755 --- a/helm/scripts/init.d/helm-http-getter +++ b/helm/scripts/init.d/helm-http-getter @@ -4,7 +4,7 @@ # # by --Zack # Created: Tue, 8 Oct 2002 17:18:17 +0200 -# Last-Modified: Wed, 8 Jan 2003 12:09:41 +0100 +# Last-Modified: Fri, 16 Apr 2004 18:21:30 +0200 DAEMON="/projects/helm/daemons/http_getter/http_getter.opt" USAGE="Usage: /etc/init.d/helm-http-getter { start | stop | restart }" @@ -17,16 +17,25 @@ NAME=`basename $DAEMON` PIDFILE=/var/run/$NAME.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 "Starting $DAEMON respawner" + /etc/init.d/daemon_respawner.sh -p $PIDFILE \ -m root@localhost \ + -r http://localhost:58081/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 "." } case "$1" in diff --git a/helm/scripts/init.d/helm-search-engine b/helm/scripts/init.d/helm-search-engine index 6b9582cb2..cda415fdd 100755 --- a/helm/scripts/init.d/helm-search-engine +++ b/helm/scripts/init.d/helm-search-engine @@ -17,18 +17,25 @@ NAME=`basename $DAEMON` PIDFILE=/var/run/$NAME.pid do_start () { - echo -n "Starting $DAEMON ... " + echo -n "Starting $DAEMON" start-stop-daemon \ --start --pidfile $PIDFILE --make-pidfile \ --chuid $OWNER --background --exec $DAEMON - echo "done!" + echo "." + echo -n "Starting $DAEMON respawner" + /etc/init.d/daemon_respawner.sh -p $PIDFILE \ -m root@localhost \ + -r http://localhost:58085/help -d `basename $0` & + echo "." } do_stop () { - echo -n "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!" + echo "." } case "$1" in -- 2.39.2