aboutsummaryrefslogtreecommitdiffstats
path: root/upload-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 /upload-backup
parent23b38fa15ab7c0b39dfeabbf2f45c69f94115ec6 (diff)
global-functions: introduce and use $DeviceInfo
Diffstat (limited to 'upload-backup')
-rw-r--r--upload-backup17
1 files changed, 4 insertions, 13 deletions
diff --git a/upload-backup b/upload-backup
index b780299..a75f14a 100644
--- a/upload-backup
+++ b/upload-backup
@@ -14,6 +14,7 @@
:global BackupPassword;
:global CharacterReplace;
+:global DeviceInfo;
:global SendNotification;
:if ($BackupSendBinary != true && \
@@ -27,11 +28,6 @@
:local BackupFile "none";
:local ConfigFile "none";
-# get some system information
-:local BoardName [ / system resource get board-name ];
-:local RouterBoard [ / system routerboard get ];
-:local Update [ / system package update get ];
-
# binary backup
:if ($BackupSendBinary = true) do={
/ system backup save encryption=aes-sha256 name=$FileName password=$BackupPassword;
@@ -62,12 +58,7 @@
$SendNotification "Backup & Config Upload" \
("Backup and config export for " . $Identity . ".\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" . \
- "Backup uploaded: " . $BackupFile . "\n" . \
- "Config uploaded: " . $ConfigFile) "" "true";
+ [ $DeviceInfo ] . "\n\n" . \
+ "Backup file: " . $BackupFile . "\n" . \
+ "Config file: " . $ConfigFile) "" "true";
}