backup-upload: drop main function, use :do with on-error

This commit is contained in:
Christian Hesse 2024-03-06 15:28:55 +01:00
parent b8bd64bac5
commit 8d020a4de8

View file

@ -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={ }