mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-24 04:44:26 +02:00
dhcp-to-dns: handle dns record by comment and type
This commit is contained in:
parent
83e57e6aab
commit
f3876b0637
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ $ScriptLock $0 false 10;
|
|||
:local HostName [ $CharacterReplace [ $EitherOr ([ $ParseKeyValueStore ($LeaseVal->"comment") ]->"hostname") ($LeaseVal->"host-name") ] " " "" ];
|
||||
:local Domain ([ $IfThenElse ($ServerNameInZone = true) ($LeaseVal->"server" . ".") ] . $Zone);
|
||||
|
||||
:local DnsRecord [ /ip/dns/static/find where name=($MacDash . "." . $Domain) ];
|
||||
: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 ];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue