cloud-backup: add configurable random delay

This commit is contained in:
Christian Hesse 2021-02-23 09:55:14 +01:00
parent 766a92a74b
commit 6770a15a7d
3 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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.

View File

@ -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 "";