Commit 4c0f7ae1 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Replace static logrotate files with references to rodjek/logrotate

parent d09f3587
......@@ -200,13 +200,36 @@ class freeradius (
require => [Package[$freeradius::fr_package], User[$freeradius::fr_user], Group[$freeradius::fr_group]],
}
# Updated logrotate file to include radiusd-*.log
file { '/etc/logrotate.d/radiusd':
mode => '0640',
owner => 'root',
group => $freeradius::fr_group,
content => template('freeradius/radiusd.logrotate.erb'),
require => [Package[$freeradius::fr_package], Group[$freeradius::fr_group]],
logrotate::rule { 'radacct':
path => "${freeradius::fr_logpath}/radacct/*/*.log",
rotate_every => 'day',
rotate => 7,
create => false,
missingok => true,
compress => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
sharedscripts => true,
}
logrotate::rule { 'checkrad':
path => "${freeradius::fr_logpath}/checkrad.log",
rotate_every => 'week',
rotate => 1,
create => true,
missingok => true,
compress => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
}
logrotate::rule { 'radiusd':
path => "${freeradius::fr_logpath}/rad*",
rotate_every => 'week',
rotate => 26,
create => true,
missingok => true,
compress => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
sharedscripts => true,
}
# Placeholder resource for dh and random as they are dynamically generated, so they
......
......@@ -98,4 +98,17 @@ define freeradius::sql (
notify => Service[$fr_service],
}
}
# Install rotation for sqltrace if we are using it
if ($sqltrace == 'yes') {
logrotate::rule { 'sqltrace':
path => "{$freeradius::fr_logpath}/${sqltracefile}",
rotate_every => 'week',
rotate => 1,
create => true,
compress => true,
missingok => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment