From: Joerg Jaspert Date: Sat, 8 Feb 2014 21:49:04 +0000 (+0100) Subject: cron.monthly X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=64f2bef2bb11d8345007fb1a05db57daa831db5b;p=dak.git cron.monthly compress last month dak log reuse "olddate" variable --- diff --git a/config/debian/cron.monthly b/config/debian/cron.monthly index d525534e..95f552c9 100755 --- a/config/debian/cron.monthly +++ b/config/debian/cron.monthly @@ -27,18 +27,19 @@ for m in mail bxamail; do done DATE=$(date +%Y-%m) +OLDDATE=$(date -d yesterday +%Y-%m) cd ${base}/log touch $DATE ln -sf $DATE current chmod g+w $DATE chown dak:ftpteam $DATE +xz -9 ${OLDDATE} -DATE=$(date -d yesterday +%Y-%m) cd /srv/upload.debian.org/queued sudo -u dak-unpriv /srv/upload.debian.org/queued/debianqueued -k || true -mv run/log log.${DATE} +mv run/log log.${OLDDATE} sudo -u dak-unpriv touch run/log -xz -9 log.${DATE} +xz -9 log.${OLDDATE} sudo -u dak-unpriv /srv/upload.debian.org/queued/debianqueued 2>/dev/null ################################################################################