X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=cron.weekly;h=a86caac260e8847de421ef1ada1e8bb5d8d95957;hb=e0b8c1b28a727fa524933497011a7aa6039e8561;hp=bafca02ecdbc9905429421852112fbff09d945e8;hpb=e8eacb00ee41d7ab974ba913fff40e5c082b8e1a;p=dak.git diff --git a/cron.weekly b/cron.weekly index bafca02e..a86caac2 100755 --- a/cron.weekly +++ b/cron.weekly @@ -8,25 +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 -# temporary hack to work around the lack of an apt-utils & python-apt package -export PYTHONPATH=$PYTHONPATH:/org/ftp.debian.org/scripts/apt/build/bin/ -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/org/ftp.debian.org/scripts/apt/build/bin/ -export PATH=$PATH:/org/ftp.debian.org/scripts/apt/build/bin/ +# Purge empty directories -cd $masterdir -shania -v -shania -v -m -i $incoming +if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then + find $ftpdir/pool/ -type d -empty | xargs rmdir; +fi -# TODO: weekly postins to d-c (?), backup of report (?), backup of changes.tgz (?) +# 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 ################################################################################