From a545d0d39e21b4fdf0b68153f7b4b175e2ea2bdf Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 12 Nov 2024 17:46:02 +0100 Subject: check-routeros-update: always exit early if up to date... ... and just make the output and log dependent on terminal. --- check-routeros-update.rsc | 6 ++++-- 1 file 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; } -- cgit v1.2.3-70-g09d2