Even better health script (ie. works)

This commit is contained in:
Neale Pickett 2007-10-04 17:02:48 -06:00
parent bcbb096d7d
commit 2dcc5124bb
1 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,10 @@
#! /bin/sh #! /bin/sh
## Restart the bot if it's not running ## Restart the bot if it's not running
# Gallium assumes everything's in the cwd # You can specify which bot to run as a command line option;
cd $(basename $0) # default gallium
bot=${1:-gallium}
kill -0 $(cat gallium.pid) 2>/dev/null || ./gallium.py cd $(dirname $0)
kill -0 $(cat $bot.pid) 2>/dev/null || ./$bot.py