From 94581741f42d809a1364accda57cdf1d57519ffa Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 12 Sep 2019 13:45:44 +0200 Subject: global-functions: introduce and use $DeviceInfo --- check-routeros-update | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'check-routeros-update') 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"); -- cgit v1.2.3-54-g00ecf