]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.dinstall
Merge branch 'master' into security
[dak.git] / config / debian / cron.dinstall
index de44fe5f05ac7e98e4a1e30a9c1bc6be19a68a05..cb326fc6b79116e317de59cfb62973ac847c36f4 100755 (executable)
@@ -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