Added SVN commit and HUP to the cron, only if there are no errors reported.

git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@36 c5d60b8d-fdcb-4146-b734-af4215e9eb71
This commit is contained in:
ircnet
2009-09-08 09:32:35 +00:00
parent 0310776aea
commit 1f1520bac4

View File

@ -53,11 +53,11 @@ do_asset()
function bitcron_main()
{
cd /home/ircd/ircd/etc || fatal "No config directory"
cd $OUTPUT_ROOT || fatal "No OUTPUT_ROOT directory"
echo "Gathering I-Lines for countries"
do_country ch 200 1000
do_country li 202 15
do_country ch 200 1200 || error "ilines.ch.conf failed"
do_country li 202 10 || error "ilines.li.conf failed"
echo "Gathering I-Lines for AS numbers"
ASN_LIST=$(awk -F'|' '$2=/(CH|LI)/ {
@ -67,12 +67,22 @@ function bitcron_main()
printf $4
}
}' < $INPUT_DELEGATED )
do_asn $ASN_LIST 250 1000
do_asn $ASN_LIST 250 1300 || error "ilines.asn.conf failed"
echo "Gathering I-Lines for AS-SETs"
do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX 300 1000
do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX 300 1300 || error "ilines.as-set.conf failed"
# svn commit -m "Automatic I-lines update by ilines_update.cron"
# pkill -HUP ircd
if [ $ERR -eq 0 ]l; then
echo "This is what we've got:"
ls -l $OUTPUT_ROOT/include/ilines.*.conf
tail -n 1 $OUTPUT_ROOT/include/ilines.*.conf
echo "Committing to SVN"
svn commit -m "Automatic I-lines update by ilines_update.cron"
echo "HUPing ircd"
pkill -HUP ircd
else
fatal "Not submitting/HUPing. This needs human attention"
fi
}