]> matita.cs.unibo.it Git - helm.git/commitdiff
removed deprecated uwobo_forever.sh
authorStefano Zacchiroli <zack@upsilon.cc>
Fri, 16 Apr 2004 16:16:36 +0000 (16:16 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Fri, 16 Apr 2004 16:16:36 +0000 (16:16 +0000)
helm/scripts/init.d/uwobo_forever.sh [deleted file]

diff --git a/helm/scripts/init.d/uwobo_forever.sh b/helm/scripts/init.d/uwobo_forever.sh
deleted file mode 100755 (executable)
index 3b8e5d2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-# THIS SCRIPT IS DEPRECATED, USE daemon_respawner.sh INSTEAD
-exit 0
-
-#
-# respawner for UWOBO (http://helm.cs.unibo.it/software/uwobo)
-#
-# by --Zack <zack@cs.unibo.it>
-#
-# Created: Mon,  7 Apr 2003 18:59:56 +0200 zacchiro
-# Last-Modified: Tue,  8 Apr 2003 10:06:41 +0200 zacchiro
-#
-
-# Warning: $PIDFILE value is shared by UWOBO /etc/init.d script, change at your
-# own risk
-PIDFILE="/var/run/uwobo.opt.pid"
-
-MAILTO="root@mowgli.cs.unibo.it"
-INTERVAL="60"
-
-# Usage: alert <subject> <body>
-alert ()
-{
-  echo "$2" | mail -s "$1" $MAILTO
-}
-
-# check if uwobo is still alive
-uwobo_is_alive ()
-{
-   if [ -r "$PIDFILE" ]; then
-     ps `cat $PIDFILE` &> /dev/null
-   else # no pid file found, uwobo has been shutdown nicely
-     exit 0
-   fi
-}
-
-# start uwobo
-start_uwobo ()
-{
-   /etc/init.d/helm-uwobo start &
-}
-
-# first check
-if ! uwobo_is_alive; then
-   alert "UWOBO failed to start :-((" "UWOBO died during initialization :-((, enjoy debugging! :-P. Cheers."
-   exit 0
-fi
-
-# continuous checks
-while true; do
-   sleep $INTERVAL
-   if ! uwobo_is_alive; then
-      alert "UWOBO died :-(, restarting it ..." "UWOBO died miserably :-(. I'm going to try restarting it, you will receive an additional mail in case of failure. Cheers."
-      start_uwobo # performed in background
-      exit 0
-   fi
-done
-