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 --- cloud-backup | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'cloud-backup') diff --git a/cloud-backup b/cloud-backup index 5a36f29..d948f99 100644 --- a/cloud-backup +++ b/cloud-backup @@ -7,13 +7,9 @@ :global Identity; :global BackupPassword; +:global DeviceInfo; :global SendNotification; -# get some system information -:local BoardName [ / system resource get board-name ]; -:local RouterBoard [ / system routerboard get ]; -:local Update [ / system package update get ]; - :do { # we are not interested in output, but print without count-only is # required to fetch information from cloud @@ -29,12 +25,7 @@ $SendNotification "Cloud backup" \ ("Uploaded backup for " . $Identity . " to cloud.\n\n" . \ - "Board name: " . $BoardName . "\n" . \ - "Model: " . $RouterBoard->"model" . "\n" . \ - "Serial number: " . $RouterBoard->"serial-number" . "\n" . \ - "Hostname: " . $Identity . "\n" . \ - "Channel: " . $Update->"channel" . "\n" . \ - "RouterOS: " . $Update->"installed-version" . "\n\n" . \ + [ $DeviceInfo ] . "\n\n" . \ "Name: " . $Cloud->"name" . "\n" . \ "Size: " . $Cloud->"size" . "\n" . \ "Download key: " . $Cloud->"secret-download-key") "" "true"; -- cgit v1.2.3-54-g00ecf