summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dyndns.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-03-07 10:18:36 +0000
committerErmal <eri@pfsense.org>2013-03-07 10:18:36 +0000
commitf42193a4310d4c059d8d1d66b8ec2406495384ed (patch)
tree05b8078da6cf5662790b789fb007a59fd73d3fa8 /usr/local/www/services_dyndns.php
parent1befdbf866c99106b7cd647c6e2f03defe447085 (diff)
downloadpfsense-f42193a4310d4c059d8d1d66b8ec2406495384ed.zip
pfsense-f42193a4310d4c059d8d1d66b8ec2406495384ed.tar.gz
Try to fix the issue reported on http://forum.pfsense.org/index.php/topic,59746.0.html
Diffstat (limited to 'usr/local/www/services_dyndns.php')
-rwxr-xr-xusr/local/www/services_dyndns.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index a80b6ae..5049d63 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -45,14 +45,10 @@ if (!is_array($config['dyndnses']['dyndns']))
$a_dyndns = &$config['dyndnses']['dyndns'];
if ($_GET['act'] == "del") {
- unset($a_dyndns[$_GET['id']]);
-
- for($i = 0; $i < count($a_dyndns); $i++) {
- $a_dyndns[$i]['id'] = $i;
- }
- //FIXME: Instead of rechecking all interfaces and removing the cache files, gracefully move all cache files to the appropriate ID number.
- mwexec("/bin/rm {$g['conf_path']}/dyndns_*.cache");
+ $conf = $a_dyndns[$_GET['id']];
+ @unlink("{$g['conf_path']}/dyndns_{$conf['interface']}{$conf['type']}" . escapeshellarg($conf['host']) . "{$conf['id']}.cache");
+ unset($a_dyndns[$_GET['id']]);
write_config();
services_dyndns_configure();
OpenPOWER on IntegriCloud