mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-17 08:52:27 +00:00
global-functions: $IsDNSResolving: check with :retry
This commit is contained in:
parent
811df5abf2
commit
0ef11bf11d
1 changed files with 9 additions and 9 deletions
|
|
@ -812,16 +812,16 @@
|
||||||
# check if DNS is resolving
|
# check if DNS is resolving
|
||||||
:set IsDNSResolving do={
|
:set IsDNSResolving do={
|
||||||
:do {
|
:do {
|
||||||
:resolve "low-ttl.eworm.de";
|
:local I 1;
|
||||||
:return true;
|
:retry {
|
||||||
} on-error={ }
|
:set I ($I ^ 1);
|
||||||
|
:resolve ("low-ttl.eworm." . ({ "de"; "net" }->$I));
|
||||||
|
} delay=50ms max=6;
|
||||||
|
} on-error={
|
||||||
|
:return false;
|
||||||
|
}
|
||||||
|
|
||||||
:do {
|
:return true;
|
||||||
:resolve "low-ttl.eworm.net";
|
|
||||||
:return true;
|
|
||||||
} on-error={ }
|
|
||||||
|
|
||||||
:return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if system is is fully connected (default route reachable, DNS resolving, time sync)
|
# check if system is is fully connected (default route reachable, DNS resolving, time sync)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue