summaryrefslogtreecommitdiff
path: root/ddns.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-11 09:48:33 +0200
committerErich Eckner <git@eckner.net>2019-04-11 09:48:33 +0200
commit9e06b0dc4bc6b5f9b6431873eb115753efdf6c9a (patch)
tree3715914cfe54ca1ecd6e1a8b213f097c0eadc8c5 /ddns.php
parent0e09c136d1c320198abd58941185b141522a77de (diff)
downloadddns-9e06b0dc4bc6b5f9b6431873eb115753efdf6c9a.tar.xz
ddns.php: also remove old/all non-$filter entries
Diffstat (limited to 'ddns.php')
-rw-r--r--ddns.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/ddns.php b/ddns.php
index 859937d..0ba72c9 100644
--- a/ddns.php
+++ b/ddns.php
@@ -87,10 +87,12 @@
"update delete " . $domain . ".ddns.eckner.net IN " . $rrType . "\n" .
"send\n";
foreach ($filters as $filter) {
- $updateCommand .=
- "prereq yxrrset " . $domain . "." . $filter['name'] . ".ddns.eckner.net IN " . $rrType . "\n" .
- "update delete " . $domain . "." . $filter['name'] . ".ddns.eckner.net IN " . $rrType . "\n" .
- "send\n";
+ foreach (array('', 'non-') as $filter_prefix) {
+ $updateCommand .=
+ "prereq yxrrset " . $domain . "." . $filter_prefix . $filter['name'] . ".ddns.eckner.net IN " . $rrType . "\n" .
+ "update delete " . $domain . "." . $filter_prefix . $filter['name'] . ".ddns.eckner.net IN " . $rrType . "\n" .
+ "send\n";
+ }
}
}
// set new records no matter what