]> git.openstreetmap.org Git - chef.git/commitdiff
chrony: restart chrony on-failure
authorGrant Slater <git@firefishy.com>
Fri, 3 Jan 2020 16:06:15 +0000 (16:06 +0000)
committerGrant Slater <git@firefishy.com>
Fri, 3 Jan 2020 16:06:15 +0000 (16:06 +0000)
cookbooks/ntp/recipes/default.rb

index 66acd1991e3c6308d1d71695cc540dac2823b4e1..dd4a04ebf54d3b5f1e11be0b95d077b96265790c 100644 (file)
@@ -48,6 +48,13 @@ service "systemd-timesyncd" do
   action [:stop, :disable]
 end
 
+systemd_service "chrony-restart" do
+  service "chrony"
+  dropin "restart"
+  restart "on-failure"
+  notifies :restart, "service[chrony]"
+end
+
 service "chrony" do
   action [:enable, :start]
 end