aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cloud-backup7
-rw-r--r--doc/cloud-backup.md3
-rw-r--r--global-config1
3 files changed, 10 insertions, 1 deletions
diff --git a/cloud-backup b/cloud-backup
index 598a500..aa29faa 100644
--- a/cloud-backup
+++ b/cloud-backup
@@ -11,16 +11,23 @@
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global BackupPassword;
+:global BackupRandomDelay;
:global Identity;
:global DeviceInfo;
:global LogPrintExit2;
+:global RandomDelay;
+:global ScriptFromTerminal;
:global SendNotification;
:global SymbolForNotification;
:global WaitFullyConnected;
$WaitFullyConnected;
+:if ([ $ScriptFromTerminal $0 ] = false && $BackupRandomDelay > 0) do={
+ $RandomDelay $BackupRandomDelay;
+}
+
:do {
# we are not interested in output, but print is
# required to fetch information from cloud
diff --git a/doc/cloud-backup.md b/doc/cloud-backup.md
index bda1267..1417242 100644
--- a/doc/cloud-backup.md
+++ b/doc/cloud-backup.md
@@ -18,9 +18,10 @@ Just install the script:
Configuration
-------------
-The configuration goes to `global-config-overlay`, this is the only parameter:
+The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupPassword`: password to encrypt the backup with
+* `BackupRandomDelay`: delay up to amount of seconds when run from scheduler
Also notification settings are required for e-mail and telegram.
diff --git a/global-config b/global-config
index d9c8061..d25c456 100644
--- a/global-config
+++ b/global-config
@@ -42,6 +42,7 @@
:global BackupSendBinary false;
:global BackupSendExport true;
:global BackupPassword "v3ry-s3cr3t";
+:global BackupRandomDelay 0;
# These addresses are used to send backup and config export files to.
:global EmailBackupTo "";
:global EmailBackupCc "";