From 056fcc1243e80fca3c7e181290f887b2b82ed465 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 14 Feb 2016 10:59:51 +0000 Subject: [PATCH 1/1] Fix restarting of chef-client on Ubuntu 15.10 and newer --- cookbooks/chef/templates/default/logrotate.erb | 4 ++++ 1 file changed, 4 insertions(+) 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 } -- 2.39.5