check-routeros-update: use $ScriptFromTerminal

This commit is contained in:
Christian Hesse 2019-12-03 22:07:29 +01:00
parent ebd5ff9bfe
commit f26222d5a8

View file

@ -9,6 +9,7 @@
:global SentRouterosUpdateNotification; :global SentRouterosUpdateNotification;
:global DeviceInfo; :global DeviceInfo;
:global ScriptFromTerminal;
:global SendNotification; :global SendNotification;
:local DoUpdate do={ :local DoUpdate do={
@ -55,7 +56,7 @@
} }
} }
:if ([ / system script job print count-only where script="check-routeros-update" parent~"." ] > 0) do={ :if ([ $ScriptFromTerminal "check-routeros-update" ] = true) do={
:put ("Do you want to install RouterOS version " . $Update->"latest-version" . "? [y/N]"); :put ("Do you want to install RouterOS version " . $Update->"latest-version" . "? [y/N]");
:if ([ :terminal inkey timeout=60 ] = 121) do={ :if ([ :terminal inkey timeout=60 ] = 121) do={
$DoUpdate; $DoUpdate;