3 # Run once a week via cron, out of dak's crontab.
7 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
11 NOW=`date "+%Y.%m.%d-%H:%M:%S"`
12 LOGFILE="$logdir/weekly_${NOW}.log"
13 exec > "$LOGFILE" 2>&1
21 ################################################################################
23 # Purge empty directories
24 echo "Purging empty directories in $ftpdir/pool/"
26 if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
27 find $ftpdir/pool/ -type d -empty | xargs rmdir;
31 echo "Splitting queue/done"
32 dak split-done > /dev/null
35 echo "VACUUM; VACUUM ANALYZE;" | psql --no-psqlrc projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
37 # Clean up apt-ftparchive's databases
39 echo "Cleanup apt-ftparchive's database"
40 apt-ftparchive -q clean apt.conf
41 apt-ftparchive -q clean apt.conf.buildd
43 echo "Finally, all is done, compressing logfile"
49 ################################################################################