diff --git a/health.sh b/health.sh index dccf8a8..9dcaccf 100755 --- a/health.sh +++ b/health.sh @@ -1,7 +1,10 @@ #! /bin/sh ## Restart the bot if it's not running -# Gallium assumes everything's in the cwd -cd /home/neale/src/firebot +# You can specify which bot to run as a command line option; +# 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