mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-20 16:09:32 +00:00
netwatch-notify: early exit with :exit
This commit is contained in:
parent
bb40c7a33d
commit
e2fdb76f43
1 changed files with 2 additions and 4 deletions
|
|
@ -8,7 +8,6 @@
|
|||
# monitor netwatch and send notifications
|
||||
# https://rsc.eworm.de/doc/netwatch-notify.md
|
||||
|
||||
:local ExitOK false;
|
||||
:onerror Err {
|
||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||
|
|
@ -80,8 +79,7 @@
|
|||
}
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
:exit;
|
||||
}
|
||||
|
||||
:local ScriptFromTerminalCached [ $ScriptFromTerminal $ScriptName ];
|
||||
|
|
@ -225,5 +223,5 @@
|
|||
}
|
||||
}
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue