]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.dinstall
Gah, apt is a piece of shit. Well, it expects the uncompressed
[dak.git] / config / debian / cron.dinstall
index 2478ed4bf3db69489d42ea598e9d6f08cbbd672d..7710ebd3e68430c74392ad0223e6fa886b4ccc63 100755 (executable)
@@ -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" <<EOF
 Packages are currently being installed and indices rebuilt.
@@ -240,6 +246,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
@@ -250,7 +259,7 @@ ts
 # Compress psql backups
 echo "Compress old psql backups"
 (cd $base/backup/
-       find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' | 
+       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"