From: Tom Hughes Date: Sun, 14 Feb 2016 10:59:51 +0000 (+0000) Subject: Fix restarting of chef-client on Ubuntu 15.10 and newer X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/056fcc1243e80fca3c7e181290f887b2b82ed465 Fix restarting of chef-client on Ubuntu 15.10 and newer --- diff --git a/cookbooks/chef/templates/default/logrotate.erb b/cookbooks/chef/templates/default/logrotate.erb index 0257a83c3..d9533959c 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 restart chef-client.service +<% else -%> restart chef-client > /dev/null +<% end -%> endscript }