mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00: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 HostName [ $CharacterReplace [ $EitherOr ([ $ParseKeyValueStore ($LeaseVal->"comment") ]->"hostname") ($LeaseVal->"host-name") ] " " "" ];
|
||||||
:local Domain ([ $IfThenElse ($ServerNameInZone = true) ($LeaseVal->"server" . ".") ] . $Zone);
|
: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={
|
:if ([ :len $DnsRecord ] > 0) do={
|
||||||
:local DnsIp [ /ip/dns/static/get $DnsRecord address ];
|
:local DnsIp [ /ip/dns/static/get $DnsRecord address ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue