]> git.openstreetmap.org Git - chef.git/commitdiff
Only restart chef-client after log rotation if it is running
authorTom Hughes <tom@compton.nu>
Fri, 21 Oct 2016 17:28:41 +0000 (18:28 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 21 Oct 2016 17:28:41 +0000 (18:28 +0100)
cookbooks/chef/templates/default/logrotate.erb

index d9533959c2917ce26a02bcaf0119bb0c8044829b..21d0eb6aa44cb9a88c8b3e7926cc466d49b48ccd 100644 (file)
@@ -6,7 +6,7 @@
   compress
   postrotate
 <% if node[:lsb][:release].to_f >= 15.10 -%>
-       systemctl restart chef-client.service
+       systemctl try-restart chef-client.service
 <% else -%>
        restart chef-client > /dev/null
 <% end -%>