1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

netwatch-dns: break long lines

This commit is contained in:
Christian Hesse
2022-07-06 11:36:16 +02:00
parent 0a45e25562
commit 447e1d99f9

View File

@ -48,7 +48,8 @@ $ScriptLock $0;
} else={
:if ([ :len $DnsFallback ] > 0) do={
:if ($DnsFallback != $DnsCurrent) do={
$LogPrintExit2 info $0 ("Updating DNS servers to fallback: " . [ :tostr $DnsFallback ]) false;
$LogPrintExit2 info $0 ("Updating DNS servers to fallback: " . \
[ :tostr $DnsFallback ]) false;
/ip/dns/set servers=$DnsFallback;
/ip/dns/cache/flush;
}
@ -62,8 +63,10 @@ $ScriptLock $0;
:local HostVal [ /tool/netwatch/get $Host ];
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
:if ($HostVal->"status" = "up" && $HostInfo->"doh" = true && $HostInfo->"disabled" != true && $DohServer = "") do={
:set DohServer [ $EitherOr ($HostInfo->"doh-url") ("https://" . $HostVal->"host" . "/dns-query") ];
:if ($HostVal->"status" = "up" && $HostInfo->"doh" = true && \
$HostInfo->"disabled" != true && $DohServer = "") do={
:set DohServer [ $EitherOr ($HostInfo->"doh-url") \
("https://" . $HostVal->"host" . "/dns-query") ];
}
}