3 # THIS SCRIPT IS DEPRECATED, USE daemon_respawner.sh INSTEAD
7 # respawner for UWOBO (http://helm.cs.unibo.it/software/uwobo)
9 # by --Zack <zack@cs.unibo.it>
11 # Created: Mon, 7 Apr 2003 18:59:56 +0200 zacchiro
12 # Last-Modified: Tue, 8 Apr 2003 10:06:41 +0200 zacchiro
15 # Warning: $PIDFILE value is shared by UWOBO /etc/init.d script, change at your
17 PIDFILE="/var/run/uwobo.opt.pid"
19 MAILTO="root@mowgli.cs.unibo.it"
22 # Usage: alert <subject> <body>
25 echo "$2" | mail -s "$1" $MAILTO
28 # check if uwobo is still alive
31 if [ -r "$PIDFILE" ]; then
32 ps `cat $PIDFILE` &> /dev/null
33 else # no pid file found, uwobo has been shutdown nicely
41 /etc/init.d/helm-uwobo start &
45 if ! uwobo_is_alive; then
46 alert "UWOBO failed to start :-((" "UWOBO died during initialization :-((, enjoy debugging! :-P. Cheers."
53 if ! uwobo_is_alive; then
54 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."
55 start_uwobo # performed in background