mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
backup-email: wait for the mail to be sent
This commit is contained in:
parent
c47c9a2906
commit
490a738af1
1 changed files with 10 additions and 0 deletions
10
backup-email
10
backup-email
|
@ -83,3 +83,13 @@ $SendEMail2 ({ origin=$0; \
|
||||||
"Backup file: " . $BackupFile . "\n" . \
|
"Backup file: " . $BackupFile . "\n" . \
|
||||||
"Config file: " . $ConfigFile); \
|
"Config file: " . $ConfigFile); \
|
||||||
attach=$Attach; remove-attach=true });
|
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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue