mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-03 17:54:41 +02:00
global-functions: introduce and use $DeviceInfo
This commit is contained in:
parent
23b38fa15a
commit
94581741f4
5 changed files with 41 additions and 47 deletions
13
cloud-backup
13
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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue