From 037d287e5b250ec794f26cb0bef3fd214a35aef2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 23 Jun 2021 10:26:10 +0200 Subject: ppp-on-up: add error handling --- ppp-on-up | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ppp-on-up b/ppp-on-up index e7b2971..017edc3 100644 --- a/ppp-on-up +++ b/ppp-on-up @@ -25,6 +25,10 @@ :foreach Script in=[ / system script find where source~("\n# provides: ppp-on-up\n") ] do={ :local ScriptName [ / system script get $Script name ]; - :log debug ("Running script from ppp-on-up: " . $ScriptName); - / system script run $Script; + :do { + :log debug ("Running script from ppp-on-up: " . $ScriptName); + / system script run $Script; + } on-error={ + :log warning ("Running script '" . $ScriptName . "' from ppp-on-up failed!"); + } } -- cgit v1.2.3-70-g09d2