mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
backup-upload: drop main function, use :do with on-error
This commit is contained in:
parent
b8bd64bac5
commit
8d020a4de8
1 changed files with 4 additions and 6 deletions
|
@ -12,8 +12,8 @@
|
|||
:global GlobalFunctionsReady;
|
||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:local Main do={
|
||||
:local ScriptName [ :tostr $1 ];
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global BackupPassword;
|
||||
:global BackupRandomDelay;
|
||||
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:return false;
|
||||
:error false;
|
||||
}
|
||||
$WaitFullyConnected;
|
||||
|
||||
|
@ -153,6 +153,4 @@
|
|||
:if ($Failed = 1) do={
|
||||
:error "An error occured!";
|
||||
}
|
||||
}
|
||||
|
||||
$Main [ :jobname ];
|
||||
} on-error={ }
|
||||
|
|
Loading…
Reference in a new issue