X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/88443396c389cfea0ed8dd9a5a9a899ce50ab337..3db3ad07dd8df9edbce587e64785921ba6ab0549:/cookbooks/web/recipes/cgimap.rb?ds=sidebyside diff --git a/cookbooks/web/recipes/cgimap.rb b/cookbooks/web/recipes/cgimap.rb index 9425a356a..8303955c2 100644 --- a/cookbooks/web/recipes/cgimap.rb +++ b/cookbooks/web/recipes/cgimap.rb @@ -58,11 +58,12 @@ systemd_service "cgimap" do private_devices true protect_system "full" protect_home true + no_new_privileges true restart "on-failure" pid_file "#{node[:web][:pid_directory]}/cgimap.pid" end -if %w(database_offline api_offline).include?(node[:web][:status]) +if %w[database_offline api_offline].include?(node[:web][:status]) service "cgimap" do action :stop end @@ -70,7 +71,7 @@ else service "cgimap" do action [:enable, :start] supports :restart => true, :reload => true - subscribes :restart, "dpkg_package[openstreetmap-cgimap-bin]" + subscribes :restart, "package[openstreetmap-cgimap-bin]" subscribes :restart, "systemd_service[cgimap]" end end