X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1c848471a16f9d1ee1fc8a327af110447ea1ef4c..f1dec95b684d66a563de20fae4bf4b6fce7e93d5:/cookbooks/web/recipes/gpx.rb?ds=sidebyside diff --git a/cookbooks/web/recipes/gpx.rb b/cookbooks/web/recipes/gpx.rb index c5d0088f8..3802cfd7f 100644 --- a/cookbooks/web/recipes/gpx.rb +++ b/cookbooks/web/recipes/gpx.rb @@ -50,7 +50,7 @@ git gpx_directory do revision "live" user "rails" group "rails" - notifies :run, resources(:execute => "gpx-import-build"), :immediate + notifies :run, "execute[gpx-import-build]", :immediate end template "/etc/init.d/gpx-import" do @@ -67,15 +67,15 @@ template "/etc/init.d/gpx-import" do :database_password => db_passwords["gpximport"] end -if ["database_offline", "database_readonly", "gpx_offline"].include?(node[:web][:status]) +if %w(database_offline database_readonly gpx_offline).include?(node[:web][:status]) service "gpx-import" do action :stop end else service "gpx-import" do - action [ :enable, :start ] + action [:enable, :start] supports :restart => true, :reload => true - subscribes :restart, resources(:execute => "gpx-import-build") - subscribes :restart, resources(:template => "/etc/init.d/gpx-import") + subscribes :restart, "execute[gpx-import-build]" + subscribes :restart, "template[/etc/init.d/gpx-import]" end end