mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 18:24:35 +02:00
netwatch-notify: handle CNAME to multiple records
This commit is contained in:
parent
6f29c640e4
commit
a924de274c
2 changed files with 12 additions and 3 deletions
|
@ -62,6 +62,15 @@
|
|||
:return true;
|
||||
}
|
||||
|
||||
:local Cname [ /ip/dns/cache/find where name=$Name type="CNAME" ];
|
||||
:if ([ :len $Cname ] > 0) do={
|
||||
:set Cname [ /ip/dns/cache/get $Cname data ];
|
||||
:set Cname [ :pick $Cname 0 ([ :len $Cname ] - 1) ];
|
||||
:if ([ :len [ /ip/dns/cache/find where name=$Cname data=$Expected ] ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
}
|
||||
|
||||
:return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue