mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-08 12:15:19 +02:00
global-functions: $MailServerIsUp: do immediate check
This commit is contained in:
parent
639bfc367b
commit
c4ff95b3ae
1 changed files with 9 additions and 1 deletions
|
@ -400,7 +400,15 @@
|
||||||
/ tool netwatch add comment=$MailServer host=$MailHost;
|
/ 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;
|
:return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue