From 81a38ab9c202bf6506c87ccfb57f59cc62922dcd Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sat, 19 Feb 2005 07:37:17 +0000 Subject: Update FreeRADIUS settings page. --- packages/freeradiussettings.xml | 48 +++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 31 deletions(-) (limited to 'packages') diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml index 3bf3dfcd..a5a7b369 100644 --- a/packages/freeradiussettings.xml +++ b/packages/freeradiussettings.xml @@ -22,7 +22,7 @@ Listening Interface(s) interface - Enter the desired listening interface(s) here + Enter the desired listening interface here interfaces_selection @@ -33,36 +33,22 @@ - 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 = " . $config['installedpackages']['freeradiussettings']['config']['port'] . "\n"); - } else { - fwrite($fout, "port = 0\n"); - } - fwrite($fout, "type = auth\n}"); - } - } - } - fclose($fout); - mwexec("killall radiusd"); - mwexec("/usr/local/etc/rc.d/radiusd"); - } - sync_package(); + function sync_package() { + global $config; + $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w"); + $int_ip = find_interface_ip($config['installedpackages']['freeradiussettings']['config']['interface']); + fwrite($fout, "{\nipaddr = " . $int_ip); + if($config['installedpackages']['freeradiussettings']['config']['port'] != "") { + fwrite($fout, "port = " . $port . "\n"); + } else { + fwrite($fout, "port = 0\n"); + } + fwrite($fout, "type = auth\n}\n\n") ; + fclose($fout); + } + mwexec("killall radiusd"); + mwexec("/usr/local/etc/rc.d/radiusd"); + sync_package(); sync_package(); -- cgit v1.2.3