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:
@ -53,11 +53,11 @@ do_asset()
|
|||||||
|
|
||||||
function bitcron_main()
|
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"
|
echo "Gathering I-Lines for countries"
|
||||||
do_country ch 200 1000
|
do_country ch 200 1200 || error "ilines.ch.conf failed"
|
||||||
do_country li 202 15
|
do_country li 202 10 || error "ilines.li.conf failed"
|
||||||
|
|
||||||
echo "Gathering I-Lines for AS numbers"
|
echo "Gathering I-Lines for AS numbers"
|
||||||
ASN_LIST=$(awk -F'|' '$2=/(CH|LI)/ {
|
ASN_LIST=$(awk -F'|' '$2=/(CH|LI)/ {
|
||||||
@ -67,12 +67,22 @@ function bitcron_main()
|
|||||||
printf $4
|
printf $4
|
||||||
}
|
}
|
||||||
}' < $INPUT_DELEGATED )
|
}' < $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"
|
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"
|
if [ $ERR -eq 0 ]l; then
|
||||||
# pkill -HUP ircd
|
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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user