Добавить 'tg-update-notify'

This commit is contained in:
Ivor Barhansky 2020-10-25 16:27:04 +00:00
parent a14b6681a6
commit bd832b2bdf
1 changed files with 13 additions and 0 deletions

13
tg-update-notify Normal file
View File

@ -0,0 +1,13 @@
## Check for update
/system package update
set channel=stable
check-for-updates
## Wait on slow connections
:delay 5s;
## Important note: "installed-version" was "current-version" on older Router OSes
:if ([get installed-version] != [get latest-version]) do={
## New version of RouterOS available, let's upgrade
/tool fetch url=("https://api.telegram.org/".$botID."/sendMessage\?chat_id=-***************&text=New version $[/system package update get latest-version] of RouterOS available, let's upgrade") src-address=***.***.***.* keep-result=no;
} else={
:log info ("No RouterOS upgrade found, checking this later...")
}