From 92a97b12ca45c9653b02aa0edb9b167f895c490d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 Jul 2021 21:41:02 +0200 Subject: ospf-to-leds: do not flood but log properly --- ospf-to-leds | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ospf-to-leds') diff --git a/ospf-to-leds b/ospf-to-leds index 727f33b..40fbbb3 100644 --- a/ospf-to-leds +++ b/ospf-to-leds @@ -18,11 +18,12 @@ :local LED ([ $ParseKeyValueStore ($InstanceVal->"comment") ]->"leds"); :local LEDType [ / system leds get [ find where leds=$LED ] type ]; - $LogPrintExit2 debug $0 ("OSPF instance " . $InstanceVal->"name" . " is " . $InstanceVal->"state" . ".") false; :if ($InstanceVal->"state" = "running" && $LEDType = "off") do={ + $LogPrintExit2 info $0 ("OSPF instance " . $InstanceVal->"name" . " is running, led on!") false; / system leds set type=on [ find where leds=$LED ]; } :if ($InstanceVal->"state" = "down" && $LEDType = "on") do={ + $LogPrintExit2 info $0 ("OSPF instance " . $InstanceVal->"name" . " is down, led off!") false; / system leds set type=off [ find where leds=$LED ]; } } -- cgit v1.2.3-70-g09d2