X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.dinstall;h=cb326fc6b79116e317de59cfb62973ac847c36f4;hb=735b888fcb8ffe59582529db099456a213429f30;hp=de44fe5f05ac7e98e4a1e30a9c1bc6be19a68a05;hpb=f483192cca8c19dd46a73c469888ac440fbadb9d;p=dak.git 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