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
This commit is contained in:
ircnet
2009-09-07 21:12:42 +00:00
parent 792b5b6e8f
commit b103e1d56d

View File

@ -20,6 +20,9 @@ function bitcron_main()
warning "Incorporating these diffs from the repository" warning "Incorporating these diffs from the repository"
cat $DIFF cat $DIFF
svn update || error "Could not update local copy" 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" echo "Sending -HUP to the ircd"
pkill -HUP ircd || error "Could not send HUP to ircd" pkill -HUP ircd || error "Could not send HUP to ircd"
} }