From 674fcc46e55d9920c72962e8fa1141a2a1a13b42 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 19 Feb 2005 01:37:20 +0000 Subject: Update Colins FreeRADIUS package --- packages/freeradiussettings.xml | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 packages/freeradiussettings.xml (limited to 'packages/freeradiussettings.xml') 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 @@ + + freeradiussettings + + + Users + /pkg_edit.php?xml=freeradius.xml + + + Clients + /pkg_edit.php?xml=freeradiusclients.xml + + + Settings + /pkg_edit.php?xml=freeradiussettings.xml + + + + installedpackages->package->$packagename->configuration->settings + + + Listening Interface(s) + interface + Enter the desired listening interface(s) here + input + + + Port + port + Enter the desired port here + input + + + + 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(); + + + sync_package(); + + + -- cgit v1.2.3