From fd9b2470f1a530a6bcb9320380d52044e2ad15ba Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sat, 19 Feb 2005 19:45:38 +0000 Subject: Update to working settings code. --- packages/freeradiussettings.xml | 45 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'packages/freeradiussettings.xml') diff --git a/packages/freeradiussettings.xml b/packages/freeradiussettings.xml index a5a432e7..eced7861 100644 --- a/packages/freeradiussettings.xml +++ b/packages/freeradiussettings.xml @@ -1,22 +1,22 @@ freeradiussettings FreeRADIUS: Settings - pkg_edit.php?xml=freeradiussettings.xml&id=1 - - + pkg_edit.php?xml=freeradiussettings.xml&id=0 + + Users /pkg.php?xml=freeradius.xml - + Clients /pkg.php?xml=freeradiusclients.xml - + Settings /pkg_edit.php?xml=freeradiussettings.xml&id=0 - + installedpackages->package->$packagename->configuration->settings @@ -33,22 +33,23 @@ - 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(); + Function sync_package() { + global $config; + $fout = fopen("/usr/local/etc/raddb/radiusd.conf.dynamic","w"); + $int_ip = find_interface_ip($config['interfaces'][$_POST['interface']]['if']); + $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"); + fclose($fout); + } + mwexec("killall radiusd"); + mwexec("/usr/local/etc/rc.d/radiusd"); + sync_package(); sync_package(); -- cgit v1.2.3