aboutsummaryrefslogtreecommitdiffstats
path: root/leds-toggle-mode.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'leds-toggle-mode.rsc')
-rw-r--r--leds-toggle-mode.rsc13
1 files changed, 13 insertions, 0 deletions
diff --git a/leds-toggle-mode.rsc b/leds-toggle-mode.rsc
new file mode 100644
index 0000000..da972b7
--- /dev/null
+++ b/leds-toggle-mode.rsc
@@ -0,0 +1,13 @@
+#!rsc by RouterOS
+# RouterOS script: leds-toggle-mode
+# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
+# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+#
+# toggle LEDs mode
+# https://git.eworm.de/cgit/routeros-scripts/about/doc/leds-mode.md
+
+:if ([ /system/leds/settings/get all-leds-off ] = "never") do={
+ /system/leds/settings/set all-leds-off=immediate;
+} else={
+ /system/leds/settings/set all-leds-off=never;
+}