mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-27 19:39:34 +00:00
netwatch-dns: use :continue in loop
This commit is contained in:
parent
035a1fa39a
commit
656ee8f47f
1 changed files with 6 additions and 5 deletions
|
|
@ -124,7 +124,12 @@
|
||||||
:continue;
|
:continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :typeof [ :find $Data "doh-check-OK" ] ] = "num") do={
|
:if ([ :typeof [ :find $Data "doh-check-OK" ] ] != "num") do={
|
||||||
|
$LogPrint warning $ScriptName ("Received unexpected response from DoH server: " . \
|
||||||
|
($DohServer->"doh-url"));
|
||||||
|
:continue;
|
||||||
|
}
|
||||||
|
|
||||||
/ip/dns/set use-doh-server=($DohServer->"doh-url") verify-doh-cert=yes;
|
/ip/dns/set use-doh-server=($DohServer->"doh-url") verify-doh-cert=yes;
|
||||||
:if ([ /certificate/settings/get crl-use ] = true) do={
|
:if ([ /certificate/settings/get crl-use ] = true) do={
|
||||||
$LogPrintOnce warning $ScriptName ("Configured to use CRL, that can cause severe issue!");
|
$LogPrintOnce warning $ScriptName ("Configured to use CRL, that can cause severe issue!");
|
||||||
|
|
@ -132,10 +137,6 @@
|
||||||
/ip/dns/cache/flush;
|
/ip/dns/cache/flush;
|
||||||
$LogPrint info $ScriptName ("Setting DoH server: " . ($DohServer->"doh-url"));
|
$LogPrint info $ScriptName ("Setting DoH server: " . ($DohServer->"doh-url"));
|
||||||
:exit;
|
:exit;
|
||||||
} else={
|
|
||||||
$LogPrint warning $ScriptName ("Received unexpected response from DoH server: " . \
|
|
||||||
($DohServer->"doh-url"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue