From 2dcc5124bb4d4ef87aa89be7311153a8b0dacc70 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 4 Oct 2007 17:02:48 -0600 Subject: [PATCH] Even better health script (ie. works) --- health.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/health.sh b/health.sh index 4337c22..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 $(basename $0) +# 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