From: Tom Hughes Date: Fri, 21 Oct 2016 17:28:41 +0000 (+0100) Subject: Only restart chef-client after log rotation if it is running X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/f5c9ea64c257d7d350c01eaadbc36fe950c06091 Only restart chef-client after log rotation if it is running --- diff --git a/cookbooks/chef/templates/default/logrotate.erb b/cookbooks/chef/templates/default/logrotate.erb index d9533959c..21d0eb6aa 100644 --- a/cookbooks/chef/templates/default/logrotate.erb +++ b/cookbooks/chef/templates/default/logrotate.erb @@ -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 -%>