aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-22 22:21:06 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-22 22:21:06 +0200
commitb67712cfe449ee59476e62fa45264a152ca36220 (patch)
treedb8838a45d11daa5dd60978241abf35fb35a57c9 /global-functions
parent999763a263ab3c1847b2cafa9dca0c11a0c91573 (diff)
global-functions: add $WaitDefaultRouteReachable
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index 5d059fe..686b1fa 100644
--- a/global-functions
+++ b/global-functions
@@ -40,6 +40,7 @@
:global SendTelegram;
:global TimeIsSync;
:global UrlEncode;
+:global WaitDefaultRouteReachable;
:global WaitForFile;
:global WaitTimeSync;
@@ -694,6 +695,15 @@
:return $Return;
}
+# wait for default route to be reachable
+:set WaitDefaultRouteReachable do={
+ :global DefaultRouteIsReachable;
+
+ :while ([ $DefaultRouteIsReachable ] = false) do={
+ :delay 1s;
+ }
+}
+
# wait for file to be available
:set WaitForFile do={
:global CleanFilePath;