From 99f90358909b9d89a183ba50ea7dbb98d2658ff4 Mon Sep 17 00:00:00 2001 From: Nachtfalke Date: Tue, 20 Dec 2011 21:26:50 +0100 Subject: only enable virtual-server "coa" if there is an interface-type "coa" which needs this server. --- config/freeradius2/freeradius.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index 879077f4..ad113469 100644 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -121,10 +121,10 @@ regular_expressions = $varsettingsregularexpressions extended_expressions = $varsettingsextendedexpressions EOD; -// This activates virtual-server coa. -// A better way would be if this link would only be created if there is an interface type "coa" -// and if deleted the link will be deleted, too -exec("ln -s /usr/local/etc/raddb/sites-available/coa /usr/local/etc/raddb/sites-enabled/"); + +// Deletes virtual-server coa by default. Will be re-enabled if there is an interface-type "coa" +exec("rm -f /usr/local/etc/raddb/sites-enabled/coa"); + $arrinterfaces = $config['installedpackages']['freeradiusinterfaces']['config']; if (is_array($arrinterfaces) && !empty($arrinterfaces)) { foreach ($arrinterfaces as $item) { @@ -149,6 +149,8 @@ EOD; // Begin "if" for interface-type = coa if ($item['varinterfacetype'] == 'coa') { + // Enables virtual-server coa because interface-type is coa + exec("ln -s /usr/local/etc/raddb/sites-available/coa /usr/local/etc/raddb/sites-enabled/"); $conf .= <<