From: Tom Hughes Date: Tue, 15 Nov 2022 19:04:55 +0000 (+0000) Subject: Restart dev service correctly when they change X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/16a1937a7bcd39d3bf1cea2f4385005e0ddaf533?ds=sidebyside Restart dev service correctly when they change --- diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 3da970fbe..047a70d72 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -398,7 +398,7 @@ if node[:postgresql][:clusters][:"14/main"] action [:enable, :start] supports :restart => true subscribes :restart, "rails_port[#{site_name}]" - subscribes :restart, "systemd_service[#{name}]" + subscribes :restart, "systemd_service[rails-jobs@]" only_if "fgrep -q delayed_job #{rails_directory}/Gemfile.lock" end @@ -436,7 +436,6 @@ if node[:postgresql][:clusters][:"14/main"] user "apis" group "apis" subscribes :run, "execute[#{cgimap_directory}/configure]", :immediately - notifies :restart, "service[cgimap@#{name}]" end template "/etc/default/cgimap-#{name}" do @@ -448,11 +447,13 @@ if node[:postgresql][:clusters][:"14/main"] :database_port => node[:postgresql][:clusters][:"14/main"][:port], :database_name => database_name, :log_directory => log_directory - notifies :restart, "service[cgimap@#{name}]" end service "cgimap@#{name}" do action [:start, :enable] + subscribes :restart, "execute[#{cgimap_directory}/Makefile]" + subscribes :restart, "template[/etc/default/cgimap-#{name}]" + subscribes :restart, "systemd_service[cgimap@]" end end