X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian-security%2Fcron.daily;h=da5669759f55941b15a34993fb46ae6afcd9d717;hb=7bf3b72f5c2eef4b6e644bb6f2c4f2192f696dd5;hp=025f6fcaab038a3503bd978b822c86e149d75ebe;hpb=f0bfd37e7286156598d79b53501ebe2000bb7924;p=dak.git diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index 025f6fca..da566975 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 ################################################################################ @@ -60,19 +60,21 @@ done ################################################################################ -cd $masterdir +cd $configdir +dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg dak clean-queues +dak clean-queues -i $disembargo dak clean-suites -apt-ftparchive -q clean apt.conf -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) +find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 | +while read dumpname; do + bzip2 -9fv "$dumpname" +done -# 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 +apt-ftparchive -q clean apt.conf +apt-ftparchive -q clean apt.conf.buildd ################################################################################