Commit c8847926 authored by Jonathan's avatar Jonathan Committed by GitHub
Browse files

Merge pull request #82 from djjudas21/pidfile

Manage pidfile
parents 5a7c229e 70ae10a3
......@@ -311,7 +311,7 @@ class freeradius (
create => false,
missingok => true,
compress => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
sharedscripts => true,
}
......@@ -322,7 +322,7 @@ class freeradius (
create => true,
missingok => true,
compress => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
sharedscripts => true,
}
......@@ -333,7 +333,7 @@ class freeradius (
create => true,
missingok => true,
compress => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
sharedscripts => true,
}
......
......@@ -73,6 +73,9 @@ class freeradius::params {
default => false,
}
# Default pid file location
$fr_pidfile = "/var/run/${fr_service}/${fr_service}.pid"
# Default base path for FreeRADIUS configs
$fr_basepath = $::osfamily ? {
'RedHat' => '/etc/raddb',
......
......@@ -127,7 +127,7 @@ define freeradius::sql (
create => true,
compress => true,
missingok => true,
postrotate => 'kill -HUP `cat /var/run/radiusd/radiusd.pid`',
postrotate => "kill -HUP `cat ${freeradius::fr_pidfile}`",
}
}
}
home_server <%= @name %> {
type = <%= @type %>
<% if @ipaddr != '' -%>
<% if defined?(@ipaddr) -%>
ipaddr = <%= @ipaddr %>
<% end -%>
<% if @ipv6addr != '' -%>
<% if defined?(@ipv6addr) -%>
ipv6addr = <%= @ipv6addr %>
<% end -%>
<% if @virtual_server != '' -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
<% end -%>
port = <%= @port %>
......
home_server_pool <%= @name %> {
type = <%= @type %>
<% if @virtual_server != '' -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
<% end -%>
<% @home_server.each do |server| -%>
home_server = <%= server %>
<% end -%>
<% if @fallback != '' -%>
<% if defined?(@fallback) -%>
fallback = <%= @fallback %>
<% end -%>
}
......
# 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
# to write to a single detail file per IP and use the rotate config
# below. Another is to write to a daily detail file per IP with:
# detailfile = ${radacctdir}/%{Client-IP-Address}/%Y%m%d-detail
# (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.
<%= @fr_logpath %>/radacct/*/*.log {
daily
rotate 7
nocreate
missingok
compress
}
<%= @fr_logpath %>/checkrad.log {
weekly
rotate 1
create
missingok
compress
}
<%= @fr_logpath %>/radius*.log {
weekly
rotate 26
create
missingok
compress
}
<%= @fr_logpath %>/radutmp {
weekly
rotate 1
create
compress
missingok
}
<%= @fr_logpath %>/radwtmp {
weekly
rotate 1
create
compress
missingok
}
<%= @fr_logpath %>/sqltrace.sql {
weekly
rotate 1
create
compress
missingok
}
lastrotate
if [ -e /var/run/radiusd/radiusd.pid ] then; kill -HUP `cat /var/run/radiusd/radiusd.pid`; fi;
endscript
realm <%= @name %> {
<% if @virtual_server != '' -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
<% end -%>
<% if @auth_pool != '' -%>
<% if defined?(@auth_pool) -%>
auth_pool = <%= @auth_pool %>
<% end -%>
<% if @acct_pool != '' -%>
<% if defined?(@acct_pool) -%>
acct_pool = <%= @acct_pool %>
<% end -%>
<% if @pool != '' -%>
<% if defined?(@pool) -%>
pool = <%= @pool %>
<% end %>
<% if @nostrip -%>
......
Markdown is supported
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