mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: add $DNSIsResolving
This commit is contained in:
parent
856c879fd8
commit
b7172b69ce
|
@ -24,6 +24,7 @@
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global DefaultRouteIsReachable;
|
:global DefaultRouteIsReachable;
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
|
:global DNSIsResolving;
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global GetMacVendor;
|
:global GetMacVendor;
|
||||||
:global GetRandom;
|
:global GetRandom;
|
||||||
|
@ -218,6 +219,16 @@
|
||||||
:return $Info;
|
:return $Info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check if DNS is resolving
|
||||||
|
:set DNSIsResolving do={
|
||||||
|
:do {
|
||||||
|
:resolve mikrotik.com;
|
||||||
|
:return true;
|
||||||
|
} on-error={
|
||||||
|
:return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# download package from upgrade server
|
# download package from upgrade server
|
||||||
:set DownloadPackage do={
|
:set DownloadPackage do={
|
||||||
:local PkgName [ :tostr $1 ];
|
:local PkgName [ :tostr $1 ];
|
||||||
|
|
Loading…
Reference in a new issue