diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-19 01:37:20 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-19 01:37:20 +0000 |
commit | 674fcc46e55d9920c72962e8fa1141a2a1a13b42 (patch) | |
tree | ea1cb8ac922c4cd6bbce3ac97324db9a8662e7ac /packages/freeradiussettings.xml | |
parent | 4ee1bef7a66cea8e6a6c718594b151d4bcea3338 (diff) | |
download | pfsense-packages-674fcc46e55d9920c72962e8fa1141a2a1a13b42.tar.gz pfsense-packages-674fcc46e55d9920c72962e8fa1141a2a1a13b42.tar.bz2 pfsense-packages-674fcc46e55d9920c72962e8fa1141a2a1a13b42.zip |
Update Colins FreeRADIUS package
Diffstat (limited to 'packages/freeradiussettings.xml')
-rw-r--r-- | packages/freeradiussettings.xml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml new file mode 100644 index 00000000..8776f5f3 --- /dev/null +++ b/packages/freeradiussettings.xml @@ -0,0 +1,66 @@ +<packagegui> + <name>freeradiussettings</name> + <tabs> + <tab> + <text>Users</text> + <url>/pkg_edit.php?xml=freeradius.xml</url> + </tab> + <tab> + <text>Clients</text> + <url>/pkg_edit.php?xml=freeradiusclients.xml</url> + </tab> + <tab> + <text>Settings</text> + <url>/pkg_edit.php?xml=freeradiussettings.xml</url> + <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(s) here</description> + <type>input</type> + </field> + <field> + <fielddescr>Port</fielddescr> + <fieldname>port</fieldname> + <description>Enter the desired port here</description> + <type>input</type> + </field> + </fields> + <custom_php_command_before_form> + function sync_package() { + global $config; + $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w"); + if($config['installedpackages']['freeradiusclients']['config'] != "") { + /* Comment out port entries to use listen directives instead. + if($config['installedpackages']['freeradiussettings']['config']['port'] != "") { + fwrite($fout, "port = " . $port . "\n\n"); + } else { + fwrite($fout, "port = 0\n\n"); + } + */ + if($config['installedpackages']['freeradiussettings']['config']['interface'] != "") { + $split_int = split(" ", $config['installedpackages']['freeradiussettings']['config']['interface']); + foreach($split_int as $int) { + $int_ip = find_interface_ip($int); + fwrite($fout, "{\nipaddr = " . $int_ip . "\n"); + if($config['installedpackages']['freeradiussettings']['config']['port'] != "") { + fwrite($fout, "port = " . $port . "\n"); + } else { + fwrite($fout, "port = 0\n"); + } + fwrite($fout, "type = auth\n}"; + } + } + fclose($fout); + } + sync_package(); + </custom_php_command_before_form> + <custom_add_php_command> + sync_package(); + </custom_add_php_command> +</packagegui> + |