Merge pull request 'Добавить 'tg-update-notify'' (#1) from lopar-patch-1 into master
Reviewed-on: https://src.lopar.us/lopar/mikrotik/pulls/1
This commit is contained in:
commit
fca1f7a8e5
13
tg-update-notify
Normal file
13
tg-update-notify
Normal 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...")
|
||||
}
|
Loading…
Reference in New Issue
Block a user