diff options
Diffstat (limited to 'email-backup')
-rw-r--r-- | email-backup | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/email-backup b/email-backup index 129075a..b9e91c2 100644 --- a/email-backup +++ b/email-backup @@ -11,6 +11,7 @@ :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :global BackupPassword; +:global BackupRandomDelay; :global BackupSendBinary; :global BackupSendExport; :global Domain; @@ -21,11 +22,11 @@ :global CharacterReplace; :global DeviceInfo; :global LogPrintExit2; +:global RandomDelay; +:global ScriptFromTerminal; :global WaitForFile; :global WaitFullyConnected; -$WaitFullyConnected; - :if ($BackupSendBinary != true && \ $BackupSendExport != true) do={ $LogPrintExit2 error $0 ("Configured to send neither backup nor config export.") true; @@ -35,6 +36,12 @@ $WaitFullyConnected; $LogPrintExit2 error $0 ("Configuration is missing recipient for e-mail backup.") true; } +$WaitFullyConnected; + +:if ([ $ScriptFromTerminal $0 ] = false && $BackupRandomDelay > 0) do={ + $RandomDelay $BackupRandomDelay; +} + # filename based on identity :local FileName [ $CharacterReplace ($Identity . "." . $Domain) "." "_" ]; :local BackupFile "none"; |