X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/370a180df11efa7a03c44d702786e6dc39d7eb9d..35fab8a036e32f87e2ea96de0502b903a1c978e1:/cookbooks/web/recipes/statistics.rb?ds=sidebyside diff --git a/cookbooks/web/recipes/statistics.rb b/cookbooks/web/recipes/statistics.rb index 3ced1f4d6..d3829f06c 100644 --- a/cookbooks/web/recipes/statistics.rb +++ b/cookbooks/web/recipes/statistics.rb @@ -32,10 +32,13 @@ end systemd_service "web-statistics" do description "Generate web statistics" - exec_start "/usr/local/bin/statistics" + environment "RAILS_ENV" => "production" user "rails" + working_directory rails_directory + exec_start "/usr/local/bin/statistics" sandbox :enable_network => true - read_write_paths "#{rails_directory}/tmp" + memory_deny_write_execute false + read_write_paths ["#{rails_directory}/tmp", "/var/log/web"] end systemd_timer "web-statistics" do @@ -43,10 +46,6 @@ systemd_timer "web-statistics" do on_calendar "00:00:00" end -cron_d "statistics" do - action :delete -end - service "web-statistics.timer" do action [:enable, :start] end