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
58 # Generate override files
62 # Generate Packages and Sources files
64 apt-ftparchive generate apt.conf
65 # Generate *.diff/ incremental updates
66 dak generate-index-diffs
67 # Generate Release files
70 # Clean out old packages
71 # Now in cron.daily. JJ[03.05.2005.]
83 echo Archive maintenance finished at $(date +%X)
85 ################################################################################
87 echo "Creating post-hourly-cron-job backup of projectb database..."
88 POSTDUMP=/org/backports.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
89 pg_dump projectb > $POSTDUMP
90 (cd /org/backports.org/backup; ln -sf $POSTDUMP current)
92 ################################################################################
95 echo "VACUUM; VACUUM ANALYZE;" | psql projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
97 ################################################################################
99 # Now in cron.daily JJ[03.05.2005]
100 # Send a report on NEW/BYHAND packages
101 #helena | mail -e -s "NEW and BYHAND on $(date +%D)" ftpmaster@amd64.debian.net
102 # and one on crufty package
103 #rene | mail -e -s "rene run for $(date +%D)" ftpmaster@amd64.debian.net
105 ################################################################################
107 (cd /org/backports.org/stats; rm -f master.list; ./dmc.pl get >/dev/null 2>&1; \
108 ./mirror.pl>$ftpdir/README.mirrors.html; cd $ftpdir; /usr/bin/links -dump README.mirrors.html >README.mirrors.txt)
111 ################################################################################
113 ulimit -m 90000 -d 90000 -s 10000 -v 90000
115 run-parts --report /org/backports.org/scripts/distmnt
117 echo Daily cron scripts successful.