X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1c848471a16f9d1ee1fc8a327af110447ea1ef4c..ecb5d5beac1e41d30e47daa6a034c59b33027d12:/cookbooks/web/templates/default/logrotate.web.erb diff --git a/cookbooks/web/templates/default/logrotate.web.erb b/cookbooks/web/templates/default/logrotate.web.erb index 83a675828..ab906c688 100644 --- a/cookbooks/web/templates/default/logrotate.web.erb +++ b/cookbooks/web/templates/default/logrotate.web.erb @@ -11,13 +11,17 @@ sharedscripts postrotate <% if File.directory?("#{node[:web][:base_directory]}/rails") -%> - /bin/touch <%= node[:web][:base_directory] %>/rails/tmp/restart.txt + /usr/bin/passenger-config restart-app <%= node[:web][:base_directory] %>/rails > /dev/null +<% if node[:recipes].include?("logstash::forwarder") -%> + /usr/bin/service logstash-forwarder restart > /dev/null +<% end -%> <% end -%> <% if File.directory?("#{node[:web][:base_directory]}/gpx-import") -%> /usr/bin/service gpx-import rotated <% end -%> <% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%> /usr/bin/service 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 <% end -%> endscript }