Skip to content

Commit

Permalink
Add support for custom query file (dialup.conf)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Gazeley committed Nov 14, 2014
1 parent 65327dc commit 5bcee06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,16 @@ you will see errors like "No connections available and at max connection limit".
this to MORE than the number of threads means that there are more connections than necessary.
Leave blank to set it to the same value as the number of threads.

##### `query_file`

Default: `sql/${database}/dialup.conf`. Relative path to the file which contains your SQL queries. By
default, points to the `dialup.conf` specific to your database engine, so leave this blank if you are
using stock queries.

If you need to use custom queries, it is recommended that you deploy your query file using
`freeradius::script` to install the file into `/etc/raddb/scripts/custom_dialup.conf` and then
set `query_file` to `scripts/custom_dialup.conf`.


#### `freeradius::statusclient`

Expand Down
1 change: 1 addition & 0 deletions manifests/sql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
$login = 'radius',
$radius_db = 'radius',
$num_sql_socks = '${thread[pool].max_servers}',
$query_file = 'sql/${database}/dialup.conf',
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
Expand Down
2 changes: 1 addition & 1 deletion templates/sql.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@ sql {
nas_table = "nas"

# Read driver-specific configuration
$INCLUDE sql/${database}/dialup.conf
$INCLUDE <%= @query_file %>
}

0 comments on commit 5bcee06

Please sign in to comment.