Rename update to ircd_update
git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/irc.efnet.nl@21 0a436592-62d7-4152-98a5-b7e29e440240
This commit is contained in:
30
cron/ircd_update.cron
Normal file
30
cron/ircd_update.cron
Normal file
@ -0,0 +1,30 @@
|
||||
NAME="ircd_update"
|
||||
AUTHOR="Pim van Pelt"
|
||||
# MAILTO="pim@ipng.nl"
|
||||
ESCALATE_MAILTO="pim@ipng.nl,admins@efnet.nl"
|
||||
MASTERLOG="/home/ircd/cronscripts/logs/${NAME}.log"
|
||||
|
||||
PATH=/usr/local/bin:/usr/bin:/bin:/home/ircd/bin
|
||||
|
||||
function bitcron_main()
|
||||
{
|
||||
DIFF="/tmp/${NAME}.diff.$$"
|
||||
|
||||
cd ~/ircd/etc || fatal "No config directory"
|
||||
|
||||
svn diff -r HEAD > $DIFF || fatal "Could not read the SVN repository"
|
||||
|
||||
[ ! -r $DIFF ] && fatal "Cannot read diff file"
|
||||
|
||||
[ -s $DIFF ] && {
|
||||
warning "Incorporating these diffs from the repository"
|
||||
cat $DIFF
|
||||
svn update || error "Could not update local copy"
|
||||
echo "Testing ircd config"
|
||||
/home/ircd/ircd/bin/ircd -conftest || fatal "Invalid configuration at HEAD!"
|
||||
echo "Sending -HUP to the ircd"
|
||||
pkill -HUP ircd || error "Could not send HUP to ircd"
|
||||
}
|
||||
|
||||
rm -f -- $DIFF
|
||||
}
|
Reference in New Issue
Block a user