From 64f2bef2bb11d8345007fb1a05db57daa831db5b Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Sat, 8 Feb 2014 22:49:04 +0100 Subject: [PATCH] cron.monthly compress last month dak log reuse "olddate" variable --- config/debian/cron.monthly | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 ################################################################################ -- 2.39.5