Remove old apache logs

Just keep one month worth

Change-Id: I69903d494d117ff0c8e1ac48dadc8d1619e724b6
This commit is contained in:
Ian Wienand 2018-04-05 13:30:28 +10:00
parent a9dc8aa01e
commit 0e4ca66c44
1 changed files with 9 additions and 0 deletions

View File

@ -74,4 +74,13 @@ class askbot::site::cron (
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin'
}
# remove old apache logs
cron { 'apache-log-cleanup':
user => 'root',
hour => '1',
minute => '45',
command => "find /var/log/apache2 -name '*.log.gz' -mtime +30 -execdir rm {} \\;",
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin'
}
}