mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 10:04:19 +02:00
ospf-to-leds: switch to $LogPrint
This commit is contained in:
parent
030105cc2e
commit
ad65b62c1c
|
@ -14,7 +14,7 @@
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrintExit2;
|
:global LogPrint;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
|
@ -34,11 +34,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($NeighborCount > 0 && $LEDType = "off") do={
|
:if ($NeighborCount > 0 && $LEDType = "off") do={
|
||||||
$LogPrintExit2 info $ScriptName ("OSPF instance " . $InstanceVal->"name" . " has " . $NeighborCount . " neighbors, led on!") false;
|
$LogPrint info $ScriptName ("OSPF instance " . $InstanceVal->"name" . " has " . $NeighborCount . " neighbors, led on!");
|
||||||
/system/leds/set type=on [ find where leds=$LED ];
|
/system/leds/set type=on [ find where leds=$LED ];
|
||||||
}
|
}
|
||||||
:if ($NeighborCount = 0 && $LEDType = "on") do={
|
:if ($NeighborCount = 0 && $LEDType = "on") do={
|
||||||
$LogPrintExit2 info $ScriptName ("OSPF instance " . $InstanceVal->"name" . " has no neighbors, led off!") false;
|
$LogPrint info $ScriptName ("OSPF instance " . $InstanceVal->"name" . " has no neighbors, led off!");
|
||||||
/system/leds/set type=off [ find where leds=$LED ];
|
/system/leds/set type=off [ find where leds=$LED ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue