X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=cron.weekly;h=54d68b94309630b180372c168023fdb997d964a0;hb=c03d72b6ca4c9ae3942acf06c3e5322f93025f56;hp=949f50543a1fb7ad2f4b1e71682340c0c2e7f043;hpb=4b41dc06229eed89f52f397fc7df5d665fa092cf;p=dak.git diff --git a/cron.weekly b/cron.weekly index 949f5054..54d68b94 100755 --- a/cron.weekly +++ b/cron.weekly @@ -8,20 +8,18 @@ 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) +apt-ftparchive clean apt.conf ################################################################################