aboutsummaryrefslogtreecommitdiffstats
path: root/capsman-rolling-upgrade.template.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-12-06 10:31:51 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-12-09 11:49:50 +0100
commit172d43288e2117f2a687df6168d2d461e780a8c3 (patch)
tree5fb336ecff561bb3f79134181faa7b8e2d412c65 /capsman-rolling-upgrade.template.rsc
parentc909bef613884bf67d239a1e6c0bed4e3d7a112e (diff)
capsman-rolling-upgrade: use $ExitError to indicate unintentional error
Diffstat (limited to 'capsman-rolling-upgrade.template.rsc')
-rw-r--r--capsman-rolling-upgrade.template.rsc6
1 files changed, 5 insertions, 1 deletions
diff --git a/capsman-rolling-upgrade.template.rsc b/capsman-rolling-upgrade.template.rsc
index 3d98747..1bd5f2a 100644
--- a/capsman-rolling-upgrade.template.rsc
+++ b/capsman-rolling-upgrade.template.rsc
@@ -16,6 +16,7 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -23,6 +24,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -51,4 +53,6 @@
:delay ($Delay . "s");
}
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}