mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 04:54:28 +02:00
backup-cloud: use $ExitError to indicate unintentional error
This commit is contained in:
parent
ed6739b8bc
commit
36b81fab94
1 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
:global GlobalFunctionsReady;
|
||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:local ExitOK false;
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
|
@ -34,6 +35,7 @@
|
|||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set PackagesUpdateBackupFailure true;
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
}
|
||||
$WaitFullyConnected;
|
||||
|
@ -44,6 +46,7 @@
|
|||
|
||||
:if ([ $MkDir ("tmpfs/backup-cloud") ] = false) do={
|
||||
$LogPrint error $ScriptName ("Failed creating directory!");
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
}
|
||||
|
||||
|
@ -87,4 +90,6 @@
|
|||
:set PackagesUpdateBackupFailure true;
|
||||
}
|
||||
/file/remove "tmpfs/backup-cloud";
|
||||
} on-error={ }
|
||||
} on-error={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue