Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
puppet-freeradius
Commits
6aa25967
Commit
6aa25967
authored
Mar 11, 2015
by
Jonathan Gazeley
Browse files
Split out control_socket into its own class and allow the ability to set ro/rw
parent
6a44647b
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
6aa25967
...
...
@@ -8,6 +8,7 @@
*
[
Classes
](
#classes
)
*
[
`freeradius`
](
#freeradius
)
*
[
`freeradius::status_server`
](
#freeradiusstatus_server
)
*
[
`freeradius::control_socket`
](
#freeradiuscontrol_socket
)
*
[
Resources
](
#resources
)
*
[
`freeradius::attr`
](
#freeradiusattr
)
*
[
`freeradius::blank`
](
#freeradiusblank
)
...
...
@@ -126,6 +127,14 @@ Whether to enable the status server. Default: `true`
}
```
#### `freeradius::control_socket`
The
`freeradius::control_socket`
class enables the control socket which can be used with
[
RADMIN
](
http://freeradius.org/radiusd/man/radmin.html
)
.
To remove the control socket, do not include this class and the socket will be removed.
##### `mode`
Whether the control socket should be read-only or read-write. Choose from
`ro`
,
`rw`
. Default:
`ro`
.
### Resources
#### `freeradius::attr`
...
...
manifests/control_socket.pp
0 → 100644
View file @
6aa25967
# Configure the FreeRADIUS control_socket
class
freeradius::control_socket
(
$mode
=
'ro'
,
)
{
$fr_user
=
$::freeradius::params::fr_user
$fr_group
=
$::freeradius::params::fr_group
unless
$mode
in
[
'ro'
,
'rw'
]
{
fail
(
'$mode must be ro or rw'
)
}
freeradius::site
{
'control-socket'
:
content
=>
template
(
'freeradius/sites-enabled/control-socket.erb'
),
}
}
manifests/init.pp
View file @
6aa25967
...
...
@@ -12,6 +12,10 @@ class freeradius (
$syslog
=
false
,
)
inherits
freeradius::params
{
if
$control_socket
==
true
{
warn
(
'Use of the control_socket parameter in the freeradius class is deprecated. Please use the freeradius::control_socket class instead.'
)
}
file
{
'radiusd.conf'
:
name
=>
"
${freeradius::fr_basepath}
/radiusd.conf"
,
mode
=>
'0640'
,
...
...
@@ -187,13 +191,6 @@ class freeradius (
}
}
# Install a couple of virtual servers needed on all FR installations
if
$control_socket
==
true
{
freeradius::site
{
'control-socket'
:
content
=>
template
(
'freeradius/sites-enabled/control-socket.erb'
),
}
}
# Make the radius log dir traversable
file
{
[
$freeradius::fr_logpath
,
...
...
templates/sites-enabled/control-socket.erb
View file @
6aa25967
...
...
@@ -69,5 +69,5 @@ listen {
# ro = read only access (default)
# rw = read/write access.
#
mode =
rw
mode =
<%=
@mode
%>
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment