summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dyndns.php
diff options
context:
space:
mode:
authorMatt Corallo <matt@bluematt.me>2011-06-03 00:56:39 +0200
committerMatt Corallo <matt@bluematt.me>2012-05-22 23:58:30 +0200
commit37f3e7041f927d692c7381b8df33d48ae1097cf1 (patch)
tree8b73a811e4abca721d74efbe828310dac7a0847f /usr/local/www/services_dyndns.php
parentaec0f2fd54bcd617ad469db67fe34937f339936e (diff)
downloadpfsense-37f3e7041f927d692c7381b8df33d48ae1097cf1.zip
pfsense-37f3e7041f927d692c7381b8df33d48ae1097cf1.tar.gz
Add the option to use a custom Dynamic DNS Provider via an Update URL and Result Match.
Diffstat (limited to 'usr/local/www/services_dyndns.php')
-rwxr-xr-xusr/local/www/services_dyndns.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index 06f944b..7953331 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -47,8 +47,17 @@ $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");
+
write_config();
+ services_dyndns_configure();
+
header("Location: services_dyndns.php");
exit;
}
@@ -114,8 +123,8 @@ include("head.inc");
</td>
<td class="listlr">
<?php
- $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker, SelfHost, Route 53");
- $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker selfhost route53");
+ $types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS, Namecheap, HE.net, HE.net Tunnelbroker, SelfHost, Route 53, Custom");
+ $vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-tunnelbroker selfhost route53 custom");
$j = 0; for ($j = 0; $j < count($vals); $j++)
if ($vals[$j] == $dyndns['type']) {
echo htmlspecialchars($types[$j]);
@@ -128,7 +137,7 @@ include("head.inc");
</td>
<td class="listlr">
<?php
- $filename = "{$g['conf_path']}/dyndns_{$if}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . ".cache";
+ $filename = "{$g['conf_path']}/dyndns_{$if}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
$ipaddr = dyndnsCheckIP($if);
if(file_exists($filename)) {
$cached_ip_s = explode(":", file_get_contents($filename));
OpenPOWER on IntegriCloud