aboutsummaryrefslogtreecommitdiffstats
path: root/lease-script
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-06-23 01:37:52 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-06-23 08:38:44 +0200
commit96a92bb30cb04d23d1536f5d4ddfda353f2d9819 (patch)
tree38336db8fb7410820ba783cec3c2f6cc572579dc /lease-script
parent2041390f554e70b72113b7d0b68cc658db1bade6 (diff)
lease-script: add error handling
Diffstat (limited to 'lease-script')
-rw-r--r--lease-script8
1 files changed, 6 insertions, 2 deletions
diff --git a/lease-script b/lease-script
index 37d0c39..72f96eb 100644
--- a/lease-script
+++ b/lease-script
@@ -30,6 +30,10 @@
:foreach Script in=[ / system script find where source~("\n# provides: lease-script " . $State . "\n") ] do={
:local ScriptName [ / system script get $Script name ];
- :log debug ("Running script from lease-script: " . $ScriptName);
- / system script run $Script;
+ :do {
+ :log debug ("Running script from lease-script: " . $ScriptName);
+ / system script run $Script;
+ } on-error={
+ :log warning ("Running script '" . $ScriptName . "' from lease-script failed!");
+ }
}