diff options
author | Erich Eckner <git@eckner.net> | 2019-04-11 09:48:33 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-04-11 09:48:33 +0200 |
commit | 9e06b0dc4bc6b5f9b6431873eb115753efdf6c9a (patch) | |
tree | 3715914cfe54ca1ecd6e1a8b213f097c0eadc8c5 /ddns.php | |
parent | 0e09c136d1c320198abd58941185b141522a77de (diff) | |
download | ddns-9e06b0dc4bc6b5f9b6431873eb115753efdf6c9a.tar.xz |
ddns.php: also remove old/all non-$filter entries
Diffstat (limited to 'ddns.php')
-rw-r--r-- | ddns.php | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 |