mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-30 13:14:27 +02:00
check-lte-firmware-upgrade: support starting unattended firmware upgrade...
... from terminal if script is installed.
(cherry picked from commit d952e7e6c7
)
This commit is contained in:
parent
5570258ce8
commit
1cddf5590d
1 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,18 @@
|
||||||
:if (($Firmware->"installed") != ($Firmware->"latest")) do={
|
:if (($Firmware->"installed") != ($Firmware->"latest")) do={
|
||||||
$LogPrintExit2 info $0 ("A new firmware version " . ($Firmware->"latest") . " is available for " . \
|
$LogPrintExit2 info $0 ("A new firmware version " . ($Firmware->"latest") . " is available for " . \
|
||||||
"LTE interface " . $IntName . ".") false;
|
"LTE interface " . $IntName . ".") false;
|
||||||
|
|
||||||
|
:if ([ $ScriptFromTerminal $0 ] = true && \
|
||||||
|
[ :len [ / system script find where name="unattended-lte-firmware-upgrade" ] ] > 0) do={
|
||||||
|
:put ("Do you want to start unattended lte firmware upgrade for interface " . $IntName . "? [y/N]");
|
||||||
|
:if (([ / terminal inkey timeout=60 ] % 32) = 25) do={
|
||||||
|
/ system script run unattended-lte-firmware-upgrade;
|
||||||
|
$LogPrintExit2 info $0 ("Scheduled lte firmware upgrade for interface " . $IntName . "...") true;
|
||||||
|
} else={
|
||||||
|
:put "Canceled...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$0; \
|
$SendNotification2 ({ origin=$0; \
|
||||||
subject=([ $SymbolForNotification "sparkles" ] . "LTE firmware upgrade"); \
|
subject=([ $SymbolForNotification "sparkles" ] . "LTE firmware upgrade"); \
|
||||||
message=("A new firmware version " . ($Firmware->"latest") . " is available for " . \
|
message=("A new firmware version " . ($Firmware->"latest") . " is available for " . \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue