diff options
author | Christian Hesse <mail@eworm.de> | 2020-07-14 10:59:08 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-07-14 10:59:08 +0200 |
commit | c4ff95b3aeed3abb588ee94bc02d4c50310f3857 (patch) | |
tree | 951007da2b70d5f995f5881ade81a35cbe03e640 | |
parent | 639bfc367b6a7e7085190c911d437f9186e70afc (diff) |
global-functions: $MailServerIsUp: do immediate check
-rw-r--r-- | global-functions | 10 |
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; } |