3 # Executed daily via cron, out of katie's crontab.
5 export SCRIPTVARS=/org/backports.org/dak-config/vars
8 ################################################################################
11 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
13 if [ -z "$changes" ]; then
17 echo Archive maintenance started at $(date +%X)
19 NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
20 LOCKCU="$lockdir/daily.lock"
21 LOCKAC="$lockdir/unchecked.lock"
30 lockfile -l 3600 $LOCKCU
32 Packages are currently being installed and indices rebuilt.
33 Maintenance is automatic, starting hourly at 5 minutes past the hour.
34 Most of the times it is finished after about 10 til 15 minutes.
36 You should not mirror the archive during this period.
39 ################################################################################
43 dak process-accepted -pa *.changes | tee REPORT | \
44 mail -s "Install for $(date +%d.%m.%Y)" ftpmaster@backports.org
52 symlinks -d -r $ftpdir
55 dak make-suite-file-list
57 # Generate override files
61 # Generate Packages and Sources files
63 apt-ftparchive generate apt.conf
64 # Generate *.diff/ incremental updates
65 dak generate-index-diffs
66 # Generate Release files
69 # Clean out old packages
70 # Now in cron.daily. JJ[03.05.2005.]
82 echo Archive maintenance finished at $(date +%X)
84 ################################################################################
86 echo "Creating post-hourly-cron-job backup of projectb database..."
87 POSTDUMP=/org/backports.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
88 pg_dump projectb > $POSTDUMP
89 (cd /org/backports.org/backup; ln -sf $POSTDUMP current)
91 ################################################################################
94 echo "VACUUM; VACUUM ANALYZE;" | psql projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
96 ################################################################################
98 # Now in cron.daily JJ[03.05.2005]
99 # Send a report on NEW/BYHAND packages
100 #helena | mail -e -s "NEW and BYHAND on $(date +%D)" ftpmaster@amd64.debian.net
101 # and one on crufty package
102 #rene | mail -e -s "rene run for $(date +%D)" ftpmaster@amd64.debian.net
104 ################################################################################
106 (cd /org/backports.org/stats; rm -f master.list; ./dmc.pl get >/dev/null 2>&1; \
107 ./mirror.pl>$ftpdir/README.mirrors.html; cd $ftpdir; /usr/bin/links -dump README.mirrors.html >README.mirrors.txt)
110 ################################################################################
112 ulimit -m 90000 -d 90000 -s 10000 -v 90000
114 run-parts --report /org/backports.org/scripts/distmnt
116 echo Daily cron scripts successful.