mirror of
https://github.com/laspavel/mikrotik-scripts.git
synced 2025-07-24 20:55:03 +02:00
Add upgrade RouteBoard script
This commit is contained in:
parent
ff26a28d05
commit
5ff06a163b
2 changed files with 23 additions and 2 deletions
|
@ -1,20 +0,0 @@
|
|||
# https://www.urlencoder.org/
|
||||
:do {
|
||||
:local DeviceName [/system identity get name];
|
||||
:local versioninfo [/system package update check-for-updates as-value]
|
||||
:if (($versioninfo->"installed-version") != ($versioninfo->"latest-version")) do={
|
||||
/log info ("Installing new firmware version on $DeviceName: ". ($versioninfo->"latest-version"))
|
||||
:local MessageText ("*AutoUpdate%20$DeviceName%3A*%20Found%20new%20firmware%20version%20". ($versioninfo->"latest-version")."%20Installing%20now%21");
|
||||
:local SendTelegramMessage [:parse [/system script get SendTelegram source]];
|
||||
$SendTelegramMessage MessageText=$MessageText;
|
||||
|
||||
/system package update download
|
||||
|
||||
:delay 5s
|
||||
/system reboot
|
||||
}
|
||||
/log info ("Installed firmware version: " .($versioninfo->"installed-version"))
|
||||
|
||||
} on-error={
|
||||
/log error "***** AUTOUPDATE script finished with error ******"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue