X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.dinstall;h=6704fe4e0fe82393b5b0c895abaecbe7d9b242a0;hb=6e18b0d9c051739fa15d5de4e44def11998653fc;hp=6256e651f4596a07c029b83b4c9d7733d38cfc9f;hpb=da2158236790739e5a39789cf5eb9360f599b302;p=dak.git diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 6256e651..6704fe4e 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -24,6 +24,7 @@ TS=0 NOTICE="$ftpdir/Archive_Maintenance_In_Progress" LOCKCU="$lockdir/daily.lock" LOCKAC="$lockdir/unchecked.lock" +BRITNEYLOCK="$lockdir/britney.lock" lockac=0 cleanup() { @@ -37,6 +38,11 @@ cleanup() { lockfile -l 3600 $LOCKCU trap cleanup 0 +# This file is simply used to indicate to britney whether or not +# the Packages file updates completed sucessfully. It's not a lock +# from our point of view +touch ${BRITNEYLOCK} + rm -f "$NOTICE" cat > "$NOTICE" <$webdir/dm-uploaders.html # Push katie@merkel so it syncs the projectb there. Returns immediately, the sync runs detached echo "Trigger merkels projectb sync" -ssh -2 -i ~/.ssh/push_merkel_projectb katie@merkel.debian.org sleep 1 +ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb katie@merkel.debian.org sleep 1 || true ################################################################################ @@ -240,6 +254,9 @@ R --slave --vanilla < $base/misc/ftpstats.R ts +# Remove the britney lock +rm -f ${BRITNEYLOCK} + # Clean up apt-ftparchive's databases echo "Clean up apt-ftparchive's databases" cd $configdir @@ -247,14 +264,14 @@ apt-ftparchive -q clean apt.conf ts -# Compress psql backups older than a week, but no more than 20 of them +# Compress psql backups echo "Compress old psql backups" (cd $base/backup/ - find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mtime +7 | - sort | head -n20 | while read dumpname; do - echo "Compressing $dumpname" - bzip2 -9 "$dumpname" - done + find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mtime +1 | + while read dumpname; do + echo "Compressing $dumpname" + bzip2 -9 "$dumpname" + done ) ts