Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
puppet-freeradius
Commits
9a4925cf
Commit
9a4925cf
authored
Oct 30, 2014
by
Jonathan Gazeley
Browse files
Add support for log directory being in different locations on Red Hat
and Debian
parent
a935dc67
Changes
4
Hide whitespace changes
Inline
Side-by-side
manifests/init.pp
View file @
9a4925cf
...
...
@@ -158,7 +158,7 @@ class freeradius (
# Syslog rules
syslog::rule
{
'radiusd-log'
:
command
=>
"if
\$
programname ==
\'
radiusd
\'
then
/var/log/radius
/radius.log
\n
&~"
,
command
=>
"if
\$
programname ==
\'
radiusd
\'
then
${fr_logpath}
/radius.log
\n
&~"
,
order
=>
'12'
,
}
...
...
@@ -172,14 +172,14 @@ class freeradius (
# Make the radius log dir traversable
file
{
[
'/var/log/radius'
,
'/var/log/radius
/radacct
'
,
$fr_logpath
,
"
${fr_logpath}
/radacct
"
,
]:
mode
=>
'0750'
,
require
=>
Package
[
$fr_package
],
}
file
{
'/var/log/radius
/radius.log
'
:
file
{
"
${fr_logpath}
/radius.log
"
:
owner
=>
'radiusd'
,
group
=>
'radiusd'
,
seltype
=>
'radiusd_log_t'
,
...
...
@@ -190,7 +190,7 @@ class freeradius (
mode
=>
'0640'
,
owner
=>
'root'
,
group
=>
'radiusd'
,
source
=>
'puppet:///modules/
freeradius/radiusd.logrotate
'
,
content
=>
template
(
'
freeradius/radiusd.logrotate
.erb'
)
,
require
=>
Package
[
$fr_package
],
}
...
...
manifests/params.pp
View file @
9a4925cf
...
...
@@ -29,6 +29,13 @@ class freeradius::params {
default
=>
'/etc/raddb'
,
}
# Path for FreeRADIUS logs
$fr_logpath
=
$::osfamily
?
{
'RedHat'
=>
'/var/log/radius'
,
'Debian'
=>
'/var/log/freeradius'
,
default
=>
'/var/log/radius'
,
}
# FreeRADIUS user
$fr_user
=
$::osfamily
?
{
'RedHat'
=>
'radiusd'
,
...
...
templates/radiusd.conf.erb
View file @
9a4925cf
...
...
@@ -62,7 +62,7 @@ exec_prefix = /usr
sysconfdir = /etc
localstatedir = /var
sbindir = /usr/sbin
logdir =
${localstatedir}/log/radius
logdir =
<%=
@fr_logpath
%>
raddbdir = ${sysconfdir}/raddb
radacctdir = ${logdir}/radacct
...
...
fil
es/radiusd.logrotate
→
templat
es/radiusd.logrotate
.erb
View file @
9a4925cf
# You can use this to rotate the
/var/log/radius
/* files, simply copy
# You can use this to rotate the
<%=
@fr_logpath
%>
/* files, simply copy
# it to /etc/logrotate.d/radiusd
# There are different detail-rotating strategies you can use. One is
...
...
@@ -8,7 +8,7 @@
# (or similar) in radiusd.conf, without rotation. If you go with the
# second technique, you will need another cron job that removes old
# detail files. You do not need to comment out the below for method #2.
/var/log/radius
/radacct/*/*.log {
<%=
@fr_logpath
%>
/radacct/*/*.log {
daily
rotate 7
nocreate
...
...
@@ -16,7 +16,7 @@
compress
}
/var/log/radius
/checkrad.log {
<%=
@fr_logpath
%>
/checkrad.log {
weekly
rotate 1
create
...
...
@@ -24,7 +24,7 @@
compress
}
/var/log/radius
/radius*.log {
<%=
@fr_logpath
%>
/radius*.log {
weekly
rotate 26
create
...
...
@@ -32,7 +32,7 @@
compress
}
/var/log/radius
/radutmp {
<%=
@fr_logpath
%>
/radutmp {
weekly
rotate 1
create
...
...
@@ -40,14 +40,14 @@
missingok
}
/var/log/radius
/radwtmp {
<%=
@fr_logpath
%>
/radwtmp {
weekly
rotate 1
create
compress
missingok
}
/var/log/radius
/sqltrace.sql {
<%=
@fr_logpath
%>
/sqltrace.sql {
weekly
rotate 1
create
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment