mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-07 12:29:37 +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
|
||||
:set IsDNSResolving do={
|
||||
:do {
|
||||
:resolve "low-ttl.eworm.de";
|
||||
:return true;
|
||||
} on-error={ }
|
||||
:local I 1;
|
||||
:retry {
|
||||
:set I ($I ^ 1);
|
||||
:resolve ("low-ttl.eworm." . ({ "de"; "net" }->$I));
|
||||
} delay=50ms max=6;
|
||||
} on-error={
|
||||
:return false;
|
||||
}
|
||||
|
||||
:do {
|
||||
:resolve "low-ttl.eworm.net";
|
||||
:return true;
|
||||
} on-error={ }
|
||||
|
||||
:return false;
|
||||
:return true;
|
||||
}
|
||||
|
||||
# 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