X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..d8918f9ea40389c835f6a8d740d2ea95ddfceedb:/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 }