I did the following running from cron every 5 minutes. Note cron output was sent to /dev/null. It was a test box.
#!/bin/sh # ZOPE query ZOPEQUERY=`ps auwx |grep z2.py | wc -l` if test $ZOPEQUERY -lt 2; then cd /usr/local/dc/Zope ./start & echo "`date`: No response from Zope Service" >> /home/zope/zoperestartlog fi Chuck On Fri, 12 Apr 2002, Vinai Kopp wrote: > > --On Donnerstag, April 11, 2002 18:53:19 -0500 "Daniel J. Rychlik" > <[EMAIL PROTECTED]> wrote: > > > it crashes. Is their a way to write a script that monitors the behavior > > of the pid or some other kind of process that it runs from to check for > > either yes its running or no its not? > > I use a small script like this: > --------------------------------------- > #! /bin/sh > > EXE=/path/to/mud > LOGFILE=/var/log/mud.log > > if [ ! -x $EXE ]; then > echo "$EXE not executable" >> $LOGFILE > else > while [ 1 ]; do > $EXE >> $LOGFILE 2>&1 > sleep 10 > done > fi > --------------------------------------- > > HTH, > > Vinai > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]