X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ed5c7d0d587675ea405180db5d58ef9692dea871..e5dcd3ae4542c09c663e3648b474f2b227801e36:/cookbooks/web/templates/default/logrotate.web.erb?ds=sidebyside diff --git a/cookbooks/web/templates/default/logrotate.web.erb b/cookbooks/web/templates/default/logrotate.web.erb index 8cb1da526..bc38d4515 100644 --- a/cookbooks/web/templates/default/logrotate.web.erb +++ b/cookbooks/web/templates/default/logrotate.web.erb @@ -3,7 +3,7 @@ <%= node[:web][:log_directory] %>/*.log { daily missingok - rotate 7 + rotate 7 compress delaycompress notifempty @@ -21,7 +21,7 @@ <% end -%> <% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%> /bin/systemctl reload cgimap - /usr/bin/rsync <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz + /usr/bin/rsync --preallocate <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz <% end -%> endscript }