From bd832b2bdfd4d10248902141830e1b1b7b4f9a59 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sun, 25 Oct 2020 16:27:04 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'tg-update-notify'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tg-update-notify | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tg-update-notify diff --git a/tg-update-notify b/tg-update-notify new file mode 100644 index 0000000..44af011 --- /dev/null +++ b/tg-update-notify @@ -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...") +} \ No newline at end of file