]> git.openstreetmap.org Git - chef.git/commitdiff
Fix restarting of chef-client on Ubuntu 15.10 and newer
authorTom Hughes <tom@compton.nu>
Sun, 14 Feb 2016 10:59:51 +0000 (10:59 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 14 Feb 2016 11:04:09 +0000 (11:04 +0000)
cookbooks/chef/templates/default/logrotate.erb

index 0257a83c307352efba91fdd53533755c728c6b73..d9533959c2917ce26a02bcaf0119bb0c8044829b 100644 (file)
@@ -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
 }