mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-26 05:12:50 +00:00
check-lte-firmware-upgrade: early exit with :exit
This commit is contained in:
parent
0c667a54a7
commit
33e92e3e7e
2 changed files with 4 additions and 6 deletions
|
|
@ -3,12 +3,11 @@
|
|||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.22
|
||||
#
|
||||
# check for LTE firmware upgrade, send notification
|
||||
# https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md
|
||||
|
||||
:local ExitOK false;
|
||||
:onerror Err {
|
||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||
|
|
@ -20,8 +19,7 @@
|
|||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
:exit;
|
||||
}
|
||||
|
||||
:if ([ :typeof $SentLteFirmwareUpgradeNotification ] != "array") do={
|
||||
|
|
@ -103,5 +101,5 @@
|
|||
$CheckInterface $ScriptName $Interface;
|
||||
}
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue