Skip to content

Commit

Permalink
Merge branch 'aba-3.9.2' into aba-4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfaba committed Aug 9, 2024
2 parents 43a29e7 + 2837a32 commit 61c2290
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 31 deletions.
65 changes: 34 additions & 31 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Boolean $preserve_mods = true,
Boolean $correct_escapes = true,
Boolean $manage_logpath = true,
Boolean $manage_logrotate = $freeradius::params::manage_logrotate,
Optional[String] $package_ensure = 'installed',
String $radacctdir = $freeradius::params::radacctdir,
String $snmp_traps_enable = 'disable',
Expand Down Expand Up @@ -471,37 +472,39 @@
}
}

logrotate::rule { 'radacct':
path => "${freeradius::fr_logpath}/radacct/*/*.log",
rotate_every => 'day',
rotate => 7,
create => false,
missingok => true,
compress => true,
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
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 ${freeradius::fr_pidfile}`",
sharedscripts => true,
}

logrotate::rule { 'radiusd':
path => "${freeradius::fr_logpath}/radius*.log",
rotate_every => 'week',
rotate => 26,
create => true,
missingok => true,
compress => true,
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
sharedscripts => true,
if $manage_logrotate {
logrotate::rule { 'radacct':
path => "${freeradius::fr_logpath}/radacct/*/*.log",
rotate_every => 'day',
rotate => 7,
create => false,
missingok => true,
compress => true,
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
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 ${freeradius::fr_pidfile}`",
sharedscripts => true,
}

logrotate::rule { 'radiusd':
path => "${freeradius::fr_logpath}/radius*.log",
rotate_every => 'week',
rotate => 26,
create => true,
missingok => true,
compress => true,
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
sharedscripts => true,
}
}

# Placeholder resource for dh and random as they are dynamically generated, so they
Expand Down
5 changes: 5 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,9 @@

# Default radsniff pid file location
$fr_radsniff_pidfile = "/var/run/${fr_service}/radsniff.pid"

$manage_logrotate = $::osfamily ? {
'Debian' => false,
default => true,
}
}

0 comments on commit 61c2290

Please sign in to comment.