mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-21 10:15:39 +02:00
netwatch-notify: fail if global functions do not become ready
This commit is contained in:
parent
2374be9a21
commit
446aa3d7ff
1 changed files with 3 additions and 3 deletions
|
@ -8,11 +8,11 @@
|
||||||
# monitor netwatch and send notifications
|
# monitor netwatch and send notifications
|
||||||
# https://rsc.eworm.de/doc/netwatch-notify.md
|
# https://rsc.eworm.de/doc/netwatch-notify.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:retry { :if ($GlobalFunctionsReady != true) \
|
||||||
|
do={ :error ("Global functions not ready."); }; } delay=500ms max=50;
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global NetwatchNotify;
|
:global NetwatchNotify;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue