aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions10
1 files changed, 9 insertions, 1 deletions
diff --git a/global-functions b/global-functions
index 687fb6c..15a5186 100644
--- a/global-functions
+++ b/global-functions
@@ -400,7 +400,15 @@
/ tool netwatch add comment=$MailServer host=$MailHost;
}
- :if ([ / tool netwatch get [ find where comment=$MailServer ] status ] = "up") do={
+ :local NetWatch [ / tool netwatch find where comment=$MailServer ];
+ :local NetWatchVal [ / tool netwatch get $NetWatch ];
+ :if ($NetWatchVal->"status" = "up") do={
+ :return true;
+ }
+
+ / tool netwatch set interval=($NetWatchVal->"interval") $NetWatch;
+ :delay ($NetWatchVal->"timeout");
+ :if ([ / tool netwatch get $NetWatch status ] = "up") do={
:return true;
}