diff options
author | Christian Hesse <mail@eworm.de> | 2024-11-12 17:46:02 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-11-12 17:46:02 +0100 |
commit | a545d0d39e21b4fdf0b68153f7b4b175e2ea2bdf (patch) | |
tree | fafe53dceb33a3c83f18f63237eb46db23f7b174 | |
parent | 04172f0438411dd803705f372c7e85bd879d4d6b (diff) |
check-routeros-update: always exit early if up to date...
... and just make the output and log dependent on terminal.
-rw-r--r-- | check-routeros-update.rsc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc index d489351..0624808 100644 --- a/check-routeros-update.rsc +++ b/check-routeros-update.rsc @@ -55,8 +55,10 @@ /system/package/update/check-for-updates without-paging as-value; :local Update [ /system/package/update/get ]; - :if ([ $ScriptFromTerminal $ScriptName ] = true && ($Update->"installed-version") = ($Update->"latest-version")) do={ - $LogPrint info $ScriptName ("System is already up to date."); + :if (($Update->"installed-version") = ($Update->"latest-version")) do={ + :if ([ $ScriptFromTerminal $ScriptName ] = true) do={ + $LogPrint info $ScriptName ("System is already up to date."); + } :error true; } |