aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-04-23 13:53:04 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-04-29 17:41:42 +0200
commit06bdd438e826592cadb8a0812da9e4a572727781 (patch)
treeb6bec555fc97871b7bc0a58a14579c43bd3f0ad9
parent20e0b1c75d08a929a1ab48fcfea2413f7df4ccf0 (diff)
backup-cloud: clean up and simplify code
-rw-r--r--backup-cloud.rsc10
1 files changed, 4 insertions, 6 deletions
diff --git a/backup-cloud.rsc b/backup-cloud.rsc
index 1085f05..bdc6c34 100644
--- a/backup-cloud.rsc
+++ b/backup-cloud.rsc
@@ -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;