Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
puppet-freeradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projets publics
puppet-freeradius
Commits
9a4925cf
Commit
9a4925cf
authored
Oct 30, 2014
by
Jonathan Gazeley
Browse files
Options
Downloads
Patches
Plain Diff
Add support for log directory being in different locations on Red Hat
and Debian
parent
a935dc67
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
manifests/init.pp
+5
-5
5 additions, 5 deletions
manifests/init.pp
manifests/params.pp
+7
-0
7 additions, 0 deletions
manifests/params.pp
templates/radiusd.conf.erb
+1
-1
1 addition, 1 deletion
templates/radiusd.conf.erb
templates/radiusd.logrotate.erb
+7
-7
7 additions, 7 deletions
templates/radiusd.logrotate.erb
with
20 additions
and
13 deletions
manifests/init.pp
+
5
−
5
View file @
9a4925cf
...
@@ -158,7 +158,7 @@ class freeradius (
...
@@ -158,7 +158,7 @@ class freeradius (
# Syslog rules
# Syslog rules
syslog::rule
{
'radiusd-log'
:
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'
,
order
=>
'12'
,
}
}
...
@@ -172,14 +172,14 @@ class freeradius (
...
@@ -172,14 +172,14 @@ class freeradius (
# Make the radius log dir traversable
# Make the radius log dir traversable
file
{
[
file
{
[
'/var/log/radius'
,
$fr_logpath
,
'/var/log/radius
/radacct
'
,
"
${fr_logpath}
/radacct
"
,
]:
]:
mode
=>
'0750'
,
mode
=>
'0750'
,
require
=>
Package
[
$fr_package
],
require
=>
Package
[
$fr_package
],
}
}
file
{
'/var/log/radius
/radius.log
'
:
file
{
"
${fr_logpath}
/radius.log
"
:
owner
=>
'radiusd'
,
owner
=>
'radiusd'
,
group
=>
'radiusd'
,
group
=>
'radiusd'
,
seltype
=>
'radiusd_log_t'
,
seltype
=>
'radiusd_log_t'
,
...
@@ -190,7 +190,7 @@ class freeradius (
...
@@ -190,7 +190,7 @@ class freeradius (
mode
=>
'0640'
,
mode
=>
'0640'
,
owner
=>
'root'
,
owner
=>
'root'
,
group
=>
'radiusd'
,
group
=>
'radiusd'
,
source
=>
'puppet:///modules/
freeradius/radiusd.logrotate
'
,
content
=>
template
(
'
freeradius/radiusd.logrotate
.erb'
)
,
require
=>
Package
[
$fr_package
],
require
=>
Package
[
$fr_package
],
}
}
...
...
This diff is collapsed.
Click to expand it.
manifests/params.pp
+
7
−
0
View file @
9a4925cf
...
@@ -29,6 +29,13 @@ class freeradius::params {
...
@@ -29,6 +29,13 @@ class freeradius::params {
default
=>
'/etc/raddb'
,
default
=>
'/etc/raddb'
,
}
}
# Path for FreeRADIUS logs
$fr_logpath
=
$::osfamily
?
{
'RedHat'
=>
'/var/log/radius'
,
'Debian'
=>
'/var/log/freeradius'
,
default
=>
'/var/log/radius'
,
}
# FreeRADIUS user
# FreeRADIUS user
$fr_user
=
$::osfamily
?
{
$fr_user
=
$::osfamily
?
{
'RedHat'
=>
'radiusd'
,
'RedHat'
=>
'radiusd'
,
...
...
This diff is collapsed.
Click to expand it.
templates/radiusd.conf.erb
+
1
−
1
View file @
9a4925cf
...
@@ -62,7 +62,7 @@ exec_prefix = /usr
...
@@ -62,7 +62,7 @@ exec_prefix = /usr
sysconfdir = /etc
sysconfdir = /etc
localstatedir = /var
localstatedir = /var
sbindir = /usr/sbin
sbindir = /usr/sbin
logdir =
${localstatedir}/log/radius
logdir =
<%=
@fr_logpath
%>
raddbdir = ${sysconfdir}/raddb
raddbdir = ${sysconfdir}/raddb
radacctdir = ${logdir}/radacct
radacctdir = ${logdir}/radacct
...
...
This diff is collapsed.
Click to expand it.
fil
es/radiusd.logrotate
→
templat
es/radiusd.logrotate
.erb
+
7
−
7
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
# it to /etc/logrotate.d/radiusd
# There are different detail-rotating strategies you can use. One is
# There are different detail-rotating strategies you can use. One is
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
# (or similar) in radiusd.conf, without rotation. If you go with the
# (or similar) in radiusd.conf, without rotation. If you go with the
# second technique, you will need another cron job that removes old
# 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.
# detail files. You do not need to comment out the below for method #2.
/var/log/radius
/radacct/*/*.log {
<%=
@fr_logpath
%>
/radacct/*/*.log {
daily
daily
rotate 7
rotate 7
nocreate
nocreate
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
compress
compress
}
}
/var/log/radius
/checkrad.log {
<%=
@fr_logpath
%>
/checkrad.log {
weekly
weekly
rotate 1
rotate 1
create
create
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
compress
compress
}
}
/var/log/radius
/radius*.log {
<%=
@fr_logpath
%>
/radius*.log {
weekly
weekly
rotate 26
rotate 26
create
create
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
compress
compress
}
}
/var/log/radius
/radutmp {
<%=
@fr_logpath
%>
/radutmp {
weekly
weekly
rotate 1
rotate 1
create
create
...
@@ -40,14 +40,14 @@
...
@@ -40,14 +40,14 @@
missingok
missingok
}
}
/var/log/radius
/radwtmp {
<%=
@fr_logpath
%>
/radwtmp {
weekly
weekly
rotate 1
rotate 1
create
create
compress
compress
missingok
missingok
}
}
/var/log/radius
/sqltrace.sql {
<%=
@fr_logpath
%>
/sqltrace.sql {
weekly
weekly
rotate 1
rotate 1
create
create
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment