aboutsummaryrefslogtreecommitdiffstats
path: root/cloud-backup
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 /cloud-backup
parent23b38fa15ab7c0b39dfeabbf2f45c69f94115ec6 (diff)
global-functions: introduce and use $DeviceInfo
Diffstat (limited to 'cloud-backup')
-rw-r--r--cloud-backup13
1 files changed, 2 insertions, 11 deletions
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";