diff options
author | Christian Hesse <mail@eworm.de> | 2023-02-02 11:49:01 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-02-02 11:52:23 +0100 |
commit | 490a738af12a0415da252441d50cbe29745a90ad (patch) | |
tree | 21e3599b3f970c9353df6dbbefc66812634e20f2 /backup-email | |
parent | c47c9a290605ce91dd6816702b27114784c05b97 (diff) |
backup-email: wait for the mail to be sent
Diffstat (limited to 'backup-email')
-rw-r--r-- | backup-email | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/backup-email b/backup-email index 036c520..158e746 100644 --- a/backup-email +++ b/backup-email @@ -83,3 +83,13 @@ $SendEMail2 ({ origin=$0; \ "Backup file: " . $BackupFile . "\n" . \ "Config file: " . $ConfigFile); \ attach=$Attach; remove-attach=true }); + +# wait for the mail to be sent +:local I 0; +:while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={ + :if ($I >= 120) do={ + $LogPrintExit2 warning $0 ("Files are still available, sending e-mail failed.") true; + } + :delay 1s; + :set I ($I + 1); +} |