aboutsummaryrefslogtreecommitdiffstats
path: root/packages/freeradiussettings.xml
diff options
context:
space:
mode:
Diffstat (limited to 'packages/freeradiussettings.xml')
-rw-r--r--packages/freeradiussettings.xml46
1 files changed, 13 insertions, 33 deletions
diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml
index 7db3402d..91c1cd63 100644
--- a/packages/freeradiussettings.xml
+++ b/packages/freeradiussettings.xml
@@ -1,6 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
<packagegui>
<name>freeradiussettings</name>
<title>FreeRADIUS: Settings</title>
+ <include_file>freeradius.inc</include_file>
<aftersaveredirect>pkg_edit.php?xml=freeradiussettings.xml&amp;id=0</aftersaveredirect>
<tabs>
<tab>
@@ -17,47 +19,25 @@
<active/>
</tab>
</tabs>
- <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
<fields>
<field>
- <fielddescr>Listening Interface(s)</fielddescr>
<fieldname>interface</fieldname>
- <description>Enter the desired listening interface here</description>
+ <fielddescr>Listening Interface(s)</fielddescr>
+ <description>Enter the desired listening interface here.</description>
<type>interfaces_selection</type>
+ <required/>
</field>
<field>
- <fielddescr>Port</fielddescr>
<fieldname>port</fieldname>
- <description>Enter the desired port here (default 1812)</description>
+ <fielddescr>Port</fielddescr>
+ <description>Enter the port the RADIUS server will listen on. Leave blank to default to the system default, i.e., 1892.</description>
<type>input</type>
</field>
</fields>
- <custom_php_command_before_form>
- function sync_package_freeradius_settings() {
- conf_mount_rw();
- config_lock();
- global $config;
- $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w");
- fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n");
- $int = convert_friendly_interface_to_real_interface_name($config['installedpackages']['freeradiussettings']['config']['0']['interface']);
- $int_ip = find_interface_ip($int);
- $port = $config['installedpackages']['freeradiussettings']['config'][0]['port'];
- fwrite($fout, "{\nipaddr = " . $int_ip);
- if($port != "") {
- fwrite($fout, "port = " . $port . "\n");
- } else {
- fwrite($fout, "port = 0\n");
- }
- fwrite($fout, "type = auth\n}\n\n");
- fwrite($fout, "{\nipaddr = 127.0.0.1\nport = 0\ntype = auth\n}\n\n");
- fclose($fout);
- conf_mount_ro();
- config_unlock();
- restart_service("freeradius");
- }
- </custom_php_command_before_form>
- <custom_add_php_command>
- sync_package_freeradius_settings();
- </custom_add_php_command>
+ <custom_delete_php_command>
+ freeradius_settings_resync();
+ </custom_delete_php_command>
+ <custom_php_resync_config_command>
+ freeradius_settings_resync();
+ </custom_php_resync_config_command>
</packagegui>
-