aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--leds-toggle-mode.rsc6
1 files changed, 1 insertions, 5 deletions
diff --git a/leds-toggle-mode.rsc b/leds-toggle-mode.rsc
index 136c9d1..07e12ae 100644
--- a/leds-toggle-mode.rsc
+++ b/leds-toggle-mode.rsc
@@ -6,8 +6,4 @@
# 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;
-}
+/system/leds/settings/set all-leds-off=(({ "never"="immediate"; "immediate"="never" })->[ get all-leds-off ]);