mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $MailServerIsUp: do immediate check
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user