From bab0725155a46f3cb4a770095f4e35885bc4c404 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 18 Aug 2011 15:49:02 +0200 Subject: Optimize amavis garbage collection: Use a single find, and strip also empties. --- amavis/cron.daily/local-amavis | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'amavis') diff --git a/amavis/cron.daily/local-amavis b/amavis/cron.daily/local-amavis index 3e51204..a7fb06d 100755 --- a/amavis/cron.daily/local-amavis +++ b/amavis/cron.daily/local-amavis @@ -4,7 +4,6 @@ set -e -find /var/lib/amavis/virusmails/ -type f -name 'badh*' -delete -find /var/lib/amavis/virusmails/ -type f -mtime +14 -delete +find /var/lib/amavis/virusmails/ -type f \( \( -empty -and -mtime +1 \) -or -name 'badh*' -or -mtime +14 \) -delete exit 0 -- cgit v1.2.3