3 # respawner for UWOBO (http://helm.cs.unibo.it/software/uwobo)
5 # by --Zack <zack@cs.unibo.it>
7 # Created: Mon, 7 Apr 2003 18:59:56 +0200 zacchiro
8 # Last-Modified: Tue, 8 Apr 2003 10:06:41 +0200 zacchiro
11 # Warning: $PIDFILE value is shared by UWOBO /etc/init.d script, change at your
13 PIDFILE="/var/run/uwobo_mowgli.pid"
15 MAILTO="root@mowgli.cs.unibo.it"
18 # Usage: alert <subject> <body>
21 echo "$2" | mail -s "$1" $MAILTO
24 # check if uwobo is still alive
27 if [ -r "$PIDFILE" ]; then
28 ps `cat $PIDFILE` &> /dev/null
29 else # no pid file found, uwobo has been shutdown nicely
37 /etc/init.d/helm-uwobo_mowgli start &
41 if ! uwobo_is_alive; then
42 alert "UWOBO failed to start :-((" "UWOBO died during initialization :-((, enjoy debugging! :-P. Cheers."
49 if ! uwobo_is_alive; then
50 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."
51 start_uwobo # performed in background