X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..514c99b49acbac6fd3b5b0ef6c8af648c0fc67f5:/cookbooks/chef/templates/default/logrotate.erb diff --git a/cookbooks/chef/templates/default/logrotate.erb b/cookbooks/chef/templates/default/logrotate.erb index 0257a83c3..21d0eb6aa 100644 --- a/cookbooks/chef/templates/default/logrotate.erb +++ b/cookbooks/chef/templates/default/logrotate.erb @@ -5,6 +5,10 @@ weekly compress postrotate +<% if node[:lsb][:release].to_f >= 15.10 -%> + systemctl try-restart chef-client.service +<% else -%> restart chef-client > /dev/null +<% end -%> endscript }