mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
cloud-backup: use $SendNotification2
This commit is contained in:
parent
19ca17190d
commit
d6edf6c2d3
12
cloud-backup
12
cloud-backup
|
@ -18,7 +18,7 @@
|
|||
:global LogPrintExit2;
|
||||
:global RandomDelay;
|
||||
:global ScriptFromTerminal;
|
||||
:global SendNotification;
|
||||
:global SendNotification2;
|
||||
:global SymbolForNotification;
|
||||
:global WaitFullyConnected;
|
||||
|
||||
|
@ -41,14 +41,14 @@ $WaitFullyConnected;
|
|||
}
|
||||
:local Cloud [ / system backup cloud get ([ find ]->0) ];
|
||||
|
||||
$SendNotification ([ $SymbolForNotification "floppy-disk" ] . "Cloud backup") \
|
||||
("Uploaded backup for " . $Identity . " to cloud.\n\n" . \
|
||||
$SendNotification2 ({ subject=([ $SymbolForNotification "floppy-disk" ] . "Cloud backup"); \
|
||||
message=("Uploaded backup for " . $Identity . " to cloud.\n\n" . \
|
||||
[ $DeviceInfo ] . "\n\n" . \
|
||||
"Name: " . $Cloud->"name" . "\n" . \
|
||||
"Size: " . $Cloud->"size" . " B (" . ($Cloud->"size" / 1024) . " KiB)\n" . \
|
||||
"Download key: " . $Cloud->"secret-download-key") "" "true";
|
||||
"Download key: " . $Cloud->"secret-download-key"); silent=true });
|
||||
} on-error={
|
||||
$SendNotification ([ $SymbolForNotification "warning-sign" ] . "Cloud backup failed") \
|
||||
("Failed uploading backup for " . $Identity . " to cloud!\n\n" . [ $DeviceInfo ]);
|
||||
$SendNotification2 ({ subject=([ $SymbolForNotification "warning-sign" ] . "Cloud backup failed"); \
|
||||
message=("Failed uploading backup for " . $Identity . " to cloud!\n\n" . [ $DeviceInfo ]) });
|
||||
$LogPrintExit2 error $0 ("Failed uploading backup for " . $Identity . " to cloud!") true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue