aboutsummaryrefslogtreecommitdiffstats
path: root/ospf-to-leds.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'ospf-to-leds.rsc')
-rw-r--r--ospf-to-leds.rsc14
1 files changed, 9 insertions, 5 deletions
diff --git a/ospf-to-leds.rsc b/ospf-to-leds.rsc
index b78faa4..a8662b3 100644
--- a/ospf-to-leds.rsc
+++ b/ospf-to-leds.rsc
@@ -1,16 +1,17 @@
#!rsc by RouterOS
# RouterOS script: ospf-to-leds
-# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# Copyright (c) 2020-2025 Christian Hesse <mail@eworm.de>
+# https://rsc.eworm.de/COPYING.md
#
-# requires RouterOS, version=7.14
+# requires RouterOS, version=7.15
#
# visualize ospf instance state via leds
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/ospf-to-leds.md
+# https://rsc.eworm.de/doc/ospf-to-leds.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -19,6 +20,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -42,4 +44,6 @@
/system/leds/set type=off [ find where leds=$LED ];
}
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}