]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/recipes/cgimap.rb
Coerce piwik goals into a normal hash
[chef.git] / cookbooks / web / recipes / cgimap.rb
index 1a72d0363f0020d5f8ab9a55fca5ab9ee8b10917..8303955c2f3e1b329be9bd3070910da8ad4f1b56 100644 (file)
@@ -22,7 +22,9 @@ include_recipe "web::base"
 
 db_passwords = data_bag_item("db", "passwords")
 
-package "openstreetmap-cgimap-bin"
+package "openstreetmap-cgimap-bin" do
+  action :upgrade
+end
 
 if node[:web][:readonly_database_host]
   database_host = node[:web][:readonly_database_host]
@@ -56,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
@@ -68,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