mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
backup-cloud: clean up and simplify code
This commit is contained in:
parent
505074e6d3
commit
5f1656b7ce
|
@ -49,13 +49,11 @@
|
|||
|
||||
:execute {
|
||||
:global BackupPassword;
|
||||
# we are not interested in output, but print is
|
||||
# required to fetch information from cloud
|
||||
/system/backup/cloud/print as-value;
|
||||
:delay 20ms;
|
||||
:if ([ :len [ /system/backup/cloud/find ] ] > 0) do={
|
||||
|
||||
:local Backup ([ /system/backup/cloud/find ]->0);
|
||||
:if ([ :typeof $Backup ] = "id") do={
|
||||
/system/backup/cloud/upload-file action=create-and-upload \
|
||||
password=$BackupPassword replace=[ get ([ find ]->0) name ];
|
||||
password=$BackupPassword replace=$Backup;
|
||||
} else={
|
||||
/system/backup/cloud/upload-file action=create-and-upload \
|
||||
password=$BackupPassword;
|
||||
|
|
Loading…
Reference in a new issue