mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-08-04 02:04:39 +02:00
dhcp-to-dns: get all values of dns record
This commit is contained in:
parent
4c416cb39e
commit
517bb4ede8
1 changed files with 2 additions and 2 deletions
|
@ -74,9 +74,9 @@ $ScriptLock $0 false 10;
|
|||
|
||||
:local DnsRecord [ /ip/dns/static/find where comment=$Comment (!type or type=A) ];
|
||||
:if ([ :len $DnsRecord ] > 0) do={
|
||||
:local DnsIp [ /ip/dns/static/get $DnsRecord address ];
|
||||
:local DnsRecordVal [ /ip/dns/static/get $DnsRecord ];
|
||||
|
||||
:if ($DnsIp = $LeaseVal->"address") do={
|
||||
:if ($DnsRecordVal->"address" = $LeaseVal->"address") do={
|
||||
$LogPrintExit2 debug $0 ("DNS entry for " . ($MacDash . "." . $Domain) . " does not need updating.") false;
|
||||
} else={
|
||||
$LogPrintExit2 info $0 ("Replacing DNS entry for " . ($MacDash . "." . $Domain) . ", new address is " . $LeaseVal->"address" . ".") false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue