]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/templates/default/logrotate.erb
Only restart chef-client after log rotation if it is running
[chef.git] / cookbooks / chef / templates / default / logrotate.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 /var/log/chef/client.log {
4   rotate 12
5   weekly
6   compress
7   postrotate
8 <% if node[:lsb][:release].to_f >= 15.10 -%>
9         systemctl try-restart chef-client.service
10 <% else -%>
11         restart chef-client > /dev/null
12 <% end -%>
13   endscript
14 }