]> git.openstreetmap.org Git - chef.git/commitdiff
Fix cgimap log rotation
authorTom Hughes <tom@compton.nu>
Tue, 4 Oct 2016 07:51:10 +0000 (08:51 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 4 Oct 2016 07:51:36 +0000 (08:51 +0100)
cookbooks/web/recipes/cgimap.rb
cookbooks/web/templates/default/logrotate.web.erb

index d2966e1beff0deab83d7052c14d18017570c13e2..0662843f329478ee7436af683df8e5ce6041d2ef 100644 (file)
@@ -51,6 +51,7 @@ systemd_service "cgimap" do
               "CGIMAP_MAXDEBT" => "250"
   user "rails"
   exec_start "/usr/bin/openstreetmap-cgimap --daemon --port 8000 --instances 30#{switches}"
+  exec_reload "/bin/kill -HUP $MAINPID"
   private_tmp true
   private_devices true
   protect_system "full"
index 97502eb88a9bfabec21fda061fba18bd200fff59..8cb1da52641d4877060be5de76ee31e244eeb024 100644 (file)
@@ -20,7 +20,7 @@
     /etc/init.d/gpx-import rotated
 <% end -%>
 <% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
-    /etc/init.d/cgimap reload
+    /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
 <% end -%>
   endscript