From: Tom Hughes Date: Tue, 23 Jun 2020 21:37:44 +0000 (+0100) Subject: Delay trying to start squid until the end of the run X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/c2e56f41e0fe2d9e1c0f034365cfc9998b8b734a?hp=5bbd5c61e87d45a7cc52debe8e6ee77e6deb7a2a Delay trying to start squid until the end of the run This ensures that all config fragments have been updated before we try and start it, allowing recovery from breakage. --- diff --git a/cookbooks/squid/recipes/default.rb b/cookbooks/squid/recipes/default.rb index eb3876428..ff2a6a425 100644 --- a/cookbooks/squid/recipes/default.rb +++ b/cookbooks/squid/recipes/default.rb @@ -106,12 +106,17 @@ systemd_service "squid" do end service "squid" do - action [:enable, :start] + action :enable subscribes :restart, "systemd_service[squid]" subscribes :restart, "template[/etc/squid/squid.conf]" subscribes :reload, "template[/etc/resolv.conf]" end +notify_group "squid-start" do + action :run + notifies :start, "service[squid]" +end + service "squid-restart" do service_name "squid" action :restart