mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-22 20:04:26 +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 BackupSendGlobalConfig;
|
||||||
:global Domain;
|
:global Domain;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
:global PackagesUpdateBackupFailure;
|
||||||
|
|
||||||
:global CleanName;
|
:global CleanName;
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
|
@ -46,6 +47,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
|
:set PackagesUpdateBackupFailure true;
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
@ -109,7 +111,9 @@
|
||||||
:local I 0;
|
:local I 0;
|
||||||
:while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={
|
:while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={
|
||||||
:if ($I >= 120) 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;
|
:delay 1s;
|
||||||
:set I ($I + 1);
|
:set I ($I + 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue