]> git.decadent.org.uk Git - dak.git/blob - cron.daily-non-US
p-u fix
[dak.git] / cron.daily-non-US
1 #! /bin/sh
2 #
3 # Executed daily via cron, out of troup's crontab.
4
5 set -e
6 export SCRIPTVARS=/org/non-us.debian.org/katie/vars-non-US
7 . $SCRIPTVARS
8
9 ################################################################################
10
11 echo Archive maintenance started at $(date +%X)
12
13 NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
14
15 cleanup() {
16   rm -f "$NOTICE"
17 }
18 trap cleanup 0
19
20 rm -f "$NOTICE"
21 cat > "$NOTICE" <<EOF
22 Packages are currently being installed and indices rebuilt.
23 Maintenance is automatic, starting at 13:52 US Central time, and
24 ending at about 15:30.  This file is then removed.
25
26 You should not mirror the archive during this period.
27 EOF
28
29 ################################################################################
30
31 echo "Creating pre-daily-cron-job backup of projectb database..."
32 pg_dump projectb > /org/non-us.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
33
34 ################################################################################
35
36 cd $incoming
37 rm -f REPORT
38 katie -pak *.changes | direport | tee REPORT | \
39      mail -s "Non-US Install for $(date +%D)" ftpmaster@ftp-master.debian.org
40 chgrp debadmin REPORT
41 chmod 664 REPORT
42
43 cd $masterdir
44 symlinks -d -r $ftpdir
45
46 cd $masterdir
47 jenna
48 # FIXME
49 cd /org/non-us.debian.org/database/dists/
50 rm -f proposed-updates_-_all.list
51 for i in proposed-updates_-_binary-* proposed-updates_-_source.list; do cat $i >> proposed-updates_-_all.list; done
52
53 # Generate override files
54 cd $overridedir
55 denise
56 # FIXME
57 rm -f override.potato.all3
58 for i in main contrib non-free; do cat override.potato.$i >> override.potato.all3; done
59
60 # Generate Packages and Sources files
61 cd $masterdir
62 apt-ftparchive generate apt.conf-non-US
63
64 # Clean out old packages
65 rhona
66
67 cd $indices
68 charisma > .new-maintainers
69 mv -f .new-maintainers Maintainers
70 gzip -9v <Maintainers >.new-maintainers.gz
71 mv -f .new-maintainers.gz Maintainers.gz
72 cd $masterdir
73 copyoverrides
74 mklslar
75 mkchecksums
76
77 rm -f $NOTICE
78 echo Archive maintenance finished at $(date +%X)
79
80 ################################################################################
81
82 echo "Creating post-daily-cron-job backup of projectb database..."
83 pg_dump projectb > /org/non-us.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
84
85 ################################################################################
86
87 ulimit -m 90000 -d 90000 -s 10000 -v 90000
88
89 run-parts --report /org/non-us.debian.org/scripts/distmnt
90
91 echo Daily cron scripts successful.