X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/55e94b06f8e0d01c6c91b584b9ffe37d809e066a..518ae814ad880885f1f7b7a0f12a2da2eff071ce:/cookbooks/planet/templates/default/logrotate.apache.erb diff --git a/cookbooks/planet/templates/default/logrotate.apache.erb b/cookbooks/planet/templates/default/logrotate.apache.erb new file mode 100644 index 000000000..e7d9e3c23 --- /dev/null +++ b/cookbooks/planet/templates/default/logrotate.apache.erb @@ -0,0 +1,21 @@ +# DO NOT EDIT - This file is being maintained by Chef + +/var/log/apache2/*.log { + weekly + missingok + rotate 52 + compress + delaycompress + notifempty + create 640 root adm + sharedscripts + postrotate + /etc/init.d/apache2 reload > /dev/null + rsync /var/log/apache2/planet.openstreetmap.org-access.log.2.gz horntail::logs/planet.openstreetmap.org/`date -d "-7 days" +%Y-%m-%d`.gz + endscript + prerotate + if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ + run-parts /etc/logrotate.d/httpd-prerotate; \ + fi; \ + endscript +}