X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=cron.weekly;h=a86caac260e8847de421ef1ada1e8bb5d8d95957;hb=475b8103bcbb729b2c20af803dea36cd9a123f50;hp=949f50543a1fb7ad2f4b1e71682340c0c2e7f043;hpb=4b41dc06229eed89f52f397fc7df5d665fa092cf;p=dak.git diff --git a/cron.weekly b/cron.weekly index 949f5054..a86caac2 100755 --- a/cron.weekly +++ b/cron.weekly @@ -8,20 +8,19 @@ export SCRIPTVARS=/org/ftp.debian.org/katie/vars ################################################################################ -echo "Creating pre-weekly-cron-job backup of projectb database..." -pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S) +# Clean out incoming -################################################################################ +shania -cd $masterdir -shania -v -shania -v -m -i $incoming +# Purge empty directories -# TODO: weekly postins to d-c (?), backup of report (?), backup of changes.tgz (?) +if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then + find $ftpdir/pool/ -type d -empty | xargs rmdir; +fi -################################################################################ +# Clean up apt-ftparchive's databases -echo "Creating post-weekly-cron-job backup of projectb database..." -pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S) +cd $masterdir +apt-ftparchive -q clean apt.conf ################################################################################