mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-20 07:59:33 +00:00
check-certificates: early exit with :exit
This commit is contained in:
parent
d9f5105b02
commit
d8980ffc11
1 changed files with 2 additions and 4 deletions
|
|
@ -9,7 +9,6 @@
|
|||
# check for certificate validity
|
||||
# https://rsc.eworm.de/doc/check-certificates.md
|
||||
|
||||
:local ExitOK false;
|
||||
:onerror Err {
|
||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||
|
|
@ -150,8 +149,7 @@
|
|||
}
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
:exit;
|
||||
}
|
||||
$WaitFullyConnected;
|
||||
|
||||
|
|
@ -250,5 +248,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