From: Joerg Jaspert Date: Tue, 7 Oct 2008 19:41:33 +0000 (+0200) Subject: logfiles X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=735b888fcb8ffe59582529db099456a213429f30;p=dak.git logfiles only keep 60 days of cron logfiles on disc Signed-off-by: Joerg Jaspert --- diff --git a/ChangeLog b/ChangeLog index 288c7708..519c6c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-07 Joerg Jaspert + + * config/debian/cron.dinstall: Only keep the last 60 days of + dinstall logfiles on disc. + 2008-09-23 Joerg Jaspert * config/debian/dak.conf: Add the validtime fields, set to 7 diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index de44fe5f..cb326fc6 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -338,6 +338,21 @@ echo "Compress old psql backups" ts +echo "Removing old dinstall logfiles" +(cd $logdir + find -maxdepth 1 -mindepth 1 -type f -name 'dinstall_*' -mtime +60 | + while read dumpname; do + echo "Removing $dumpname" + rm -f "$dumpname" + done + + find -maxdepth 1 -mindepth 1 -type f -name 'weekly_*' -mtime +60 | + while read dumpname; do + echo "Removing $dumpname" + rm -f "$dumpname" + done +) + echo "Finally, all is done, sending mail and compressing logfile" exec > /dev/null 2>&1