diff options
Diffstat (limited to 'modules/apache/templates/logrotate')
| -rw-r--r-- | modules/apache/templates/logrotate | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/apache/templates/logrotate b/modules/apache/templates/logrotate index f84ae9fe..823989eb 100644 --- a/modules/apache/templates/logrotate +++ b/modules/apache/templates/logrotate @@ -1,13 +1,23 @@ /var/log/httpd/*_log /var/log/httpd/apache_runtime_status /var/log/httpd/ssl_mutex { - rotate <%= httpdlogs_rotate %> +<% if @hostname == 'duvel' %> + rotate 60 + daily +<% elsif @hostname == 'friteuse' %> + # The virtual disk is very small so keep log sizes down + rotate 26 + weekly +<% elsif @hostname == 'sucuk' %> + rotate 52 + weekly +<% else %> + rotate <%= scope.lookupvar('apache::var::httpdlogs_rotate') %> monthly +<% end %> missingok notifempty + sharedscripts compress - prerotate - /etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1 || : - endscript postrotate - /etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1 || : + /bin/systemctl restart httpd.service > /dev/null 2>/dev/null || true endscript } |
