diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-06 10:29:02 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | 268743ef6be5c400ec9fcb044e4961c5d8d9b531 (patch) | |
tree | f918f6f6fcb2081a17cf1e26dd7c08e72569528d /backup-upload.rsc | |
parent | 95030b9b74db03cf67c4702c82bb1d1224c9690e (diff) |
backup-upload: use $ExitError to indicate unintentional error
Diffstat (limited to 'backup-upload.rsc')
-rw-r--r-- | backup-upload.rsc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backup-upload.rsc b/backup-upload.rsc index 8d96eba..12698e9 100644 --- a/backup-upload.rsc +++ b/backup-upload.rsc @@ -12,6 +12,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -43,11 +44,13 @@ :if ($BackupSendBinary != true && \ $BackupSendExport != true) do={ $LogPrint error $ScriptName ("Configured to send neither backup nor config export."); + :set ExitOK true; :error false; } :if ([ $ScriptLock $ScriptName ] = false) do={ :set PackagesUpdateBackupFailure true; + :set ExitOK true; :error false; } $WaitFullyConnected; @@ -67,6 +70,7 @@ :if ([ $MkDir $DirName ] = false) do={ $LogPrint error $ScriptName ("Failed creating directory!"); + :set ExitOK true; :error false; } @@ -158,4 +162,6 @@ :set PackagesUpdateBackupFailure true; } /file/remove $DirName; -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} |