diff options
author | Jonas Smedegaard <dr@jones.dk> | 2011-08-18 15:49:02 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2011-08-18 15:49:02 +0200 |
commit | bab0725155a46f3cb4a770095f4e35885bc4c404 (patch) | |
tree | c439293140503b99c82eaa7a001936bd7589d4d1 | |
parent | 199410b285c233a4c990630e275dd6b63755ebba (diff) |
Optimize amavis garbage collection: Use a single find, and strip also empties.
-rwxr-xr-x | amavis/cron.daily/local-amavis | 3 |
1 files changed, 1 insertions, 2 deletions
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 |