Commit 1ada5b7b authored by Jonathan's avatar Jonathan Committed by GitHub
Browse files

Merge pull request #75 from amateo/feature/add_params

Add parameters to freeradius class
parents 19967729 c72073bf
......@@ -15,6 +15,8 @@ class freeradius (
$log_auth = 'no',
$preserve_mods = true,
$correct_escapes = true,
$manage_logpath = true,
$radacctdir = $freeradius::params::radacctdir,
) inherits freeradius::params {
validate_re($freeradius::fr_version, '^3', 'This module is only compatible with FreeRADIUS 3')
......@@ -276,20 +278,22 @@ class freeradius (
}
}
# Make the radius log dir traversable
file { [
$freeradius::fr_logpath,
"${freeradius::fr_logpath}/radacct",
]:
mode => '0750',
require => Package[$freeradius::fr_package],
}
if $manage_logpath {
# Make the radius log dir traversable
file { [
$freeradius::fr_logpath,
"${freeradius::fr_logpath}/radacct",
]:
mode => '0750',
require => Package[$freeradius::fr_package],
}
file { "${freeradius::fr_logpath}/radius.log":
owner => $freeradius::fr_user,
group => $freeradius::fr_group,
seltype => 'radiusd_log_t',
require => [Package[$freeradius::fr_package], User[$freeradius::fr_user], Group[$freeradius::fr_group]],
file { "${freeradius::fr_logpath}/radius.log":
owner => $freeradius::fr_user,
group => $freeradius::fr_group,
seltype => 'radiusd_log_t',
require => [Package[$freeradius::fr_package], User[$freeradius::fr_user], Group[$freeradius::fr_group]],
}
}
logrotate::rule { 'radacct':
......
......@@ -143,4 +143,6 @@ class freeradius::params {
'Debian' => "\${raddbdir}",
default => "\${localstatedir}/lib/radiusd",
}
$radacctdir = "\${logdir}/radacct"
}
......@@ -57,7 +57,7 @@ localstatedir = /var
sbindir = /usr/sbin
logdir = <%= @fr_logpath %>
raddbdir = <%= @fr_raddbdir %>
radacctdir = ${logdir}/radacct
radacctdir = <%= @radacctdir %>
#
# name of the running server. See also the "-n" command-line option.
......
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