From b103e1d56dc2b2a63c2468d8947bb98484c740e8 Mon Sep 17 00:00:00 2001 From: ircnet Date: Mon, 7 Sep 2009 21:12:42 +0000 Subject: [PATCH] Added a config checker. Lame that chkconf does not return != 0 if there are errors, so we have to grep around in its output :( git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@28 c5d60b8d-fdcb-4146-b734-af4215e9eb71 --- cron/update.cron | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cron/update.cron b/cron/update.cron index 1e1c786..345d283 100644 --- a/cron/update.cron +++ b/cron/update.cron @@ -20,6 +20,9 @@ function bitcron_main() warning "Incorporating these diffs from the repository" cat $DIFF svn update || error "Could not update local copy" + echo "Checking config" + [ "`/home/ircd/ircd/sbin/chkconf 2>&1 | grep ERROR`" != "" ] && \ + fatal "Configuration is invalid at HEAD!" echo "Sending -HUP to the ircd" pkill -HUP ircd || error "Could not send HUP to ircd" }