mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-22 03:44:59 +02:00
backup-email: pass failure to packages-update
This commit is contained in:
parent
c82f776632
commit
5f41bd1c1e
1 changed files with 5 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
|||
:global BackupSendGlobalConfig;
|
||||
:global Domain;
|
||||
:global Identity;
|
||||
:global PackagesUpdateBackupFailure;
|
||||
|
||||
:global CleanName;
|
||||
:global DeviceInfo;
|
||||
|
@ -46,6 +47,7 @@
|
|||
}
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set PackagesUpdateBackupFailure true;
|
||||
:error false;
|
||||
}
|
||||
$WaitFullyConnected;
|
||||
|
@ -109,7 +111,9 @@
|
|||
:local I 0;
|
||||
:while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={
|
||||
:if ($I >= 120) do={
|
||||
$LogPrintExit2 warning $ScriptName ("Files are still available, sending e-mail failed.") true;
|
||||
$LogPrintExit2 warning $ScriptName ("Files are still available, sending e-mail failed.") false;
|
||||
:set PackagesUpdateBackupFailure true;
|
||||
:error false;
|
||||
}
|
||||
:delay 1s;
|
||||
:set I ($I + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue