aboutsummaryrefslogtreecommitdiffstats
path: root/check-routeros-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-09-12 13:45:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-09-12 21:29:41 +0200
commit94581741f42d809a1364accda57cdf1d57519ffa (patch)
treef9b003f5622f5c2871e65cbba7c2f4424403e942 /check-routeros-update
parent23b38fa15ab7c0b39dfeabbf2f45c69f94115ec6 (diff)
global-functions: introduce and use $DeviceInfo
Diffstat (limited to 'check-routeros-update')
-rw-r--r--check-routeros-update12
1 files changed, 2 insertions, 10 deletions
diff --git a/check-routeros-update b/check-routeros-update
index 78fd9c6..dccfcbe 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -8,6 +8,7 @@
:global SafeUpdateUrl;
:global SentRouterosUpdateNotification;
+:global DeviceInfo;
:global SendNotification;
:local DoUpdate do={
@@ -36,9 +37,6 @@
}
:if ($Update->"installed-version" != $Update->"latest-version") do={
- :local BoardName [ / system resource get board-name ];
- :local RouterBoard [ / system routerboard get ];
-
:if ([ :len $SafeUpdateUrl ] > 0) do={
:local Result;
:do {
@@ -74,13 +72,7 @@
$SendNotification ("RouterOS update") \
("There is a RouterOS update available.\n\n" . \
- "Board name: " . $BoardName . "\n" . \
- "Model: " . $RouterBoard->"model" . "\n" . \
- "Serial number: " . $RouterBoard->"serial-number" . "\n" . \
- "Hostname: " . $Identity . "\n" . \
- "Channel: " . $Update->"channel" . "\n" . \
- "Installed: " . $Update->"installed-version" . "\n" . \
- "Available: " . $Update->"latest-version" . "\n\n" .\
+ [ $DeviceInfo ] . "\n\n" . \
"https://mikrotik.com/download/changelogs/" . $Update->"channel" . "-release-tree") \
"" "true";
:set SentRouterosUpdateNotification ($Update->"latest-version");