Skip to content

Commit c08c48f

Browse files
author
mo.elkady
committed
logrotate on reboot
1 parent c751e37 commit c08c48f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

logrotate_custom/recipes/configure.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@ def nil_or_empty?(*values)
4040
action :create
4141
end
4242

43+
template '/etc/crontab' do
44+
owner 'root'
45+
group 'root'
46+
mode '0600'
47+
48+
variables(
49+
cron_jobs: [
50+
'@reboot /usr/sbin/logrotate -f /etc/logrotate.conf'
51+
]
52+
)
53+
54+
action :create
55+
end
56+
57+
4358
logrotate_app 'monit' do
4459
path '/var/log/monit'
4560
options ['missingok', 'notifempty']

0 commit comments

Comments
 (0)