]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/logrotate.web.erb
Enable SSL for munin using letsencrypt
[chef.git] / cookbooks / web / templates / default / logrotate.web.erb
index 97502eb88a9bfabec21fda061fba18bd200fff59..bc38d45154b42c83d3c3b23baa0e2fab2864e19e 100644 (file)
@@ -3,7 +3,7 @@
 <%= node[:web][:log_directory] %>/*.log {
   daily
   missingok
-  rotate 7 
+  rotate 7
   compress
   delaycompress
   notifempty
@@ -20,8 +20,8 @@
     /etc/init.d/gpx-import rotated
 <% end -%>
 <% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
-    /etc/init.d/cgimap reload
-    /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
+    /bin/systemctl reload cgimap
+    /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
 }