X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian-security%2Fcron.daily;h=f92d184979dd8cde11db3912f604cfed4bb4e17a;hb=1d15746f9e968f07d5f803ee61cb75fc1e2f7515;hp=025f6fcaab038a3503bd978b822c86e149d75ebe;hpb=883c05418a2987751597e906ec2c63b1f5425df6;p=dak.git diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index 025f6fca..f92d1849 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # # Executed daily via cron, out of dak's crontab. set -e -export SCRIPTVARS=/org/security-master.debian.org/dak/config/debian-security/vars +export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS ################################################################################ @@ -61,6 +61,7 @@ done ################################################################################ cd $masterdir +dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg dak clean-queues dak clean-suites apt-ftparchive -q clean apt.conf @@ -69,10 +70,9 @@ apt-ftparchive -q clean apt.conf.buildd symlinks -d -r $ftpdir pg_dump obscurity > /org/security-master.debian.org/dak-backup/dump_$(date +%Y.%m.%d-%H:%M:%S) - -# Vacuum the database -set +e -echo "VACUUM; VACUUM ANALYZE;" | psql obscurity 2>&1 | egrep -v "^NOTICE: Skipping \"pg_.*only table or database owner can VACUUM it$|^VACUUM$" -set -e +find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 | +while read dumpname; do + bzip2 -9fv "$dumpname" +done ################################################################################