diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-10 20:23:26 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-17 11:20:09 +0100 |
commit | c311e58d998fabc7568acd77f0a8bd42468f50b0 (patch) | |
tree | a2ff1a6eac56e0a918fc4884e96e2250193b54c8 | |
parent | 42bcc63d29c85a7fcdb175b3ea725654d2db7039 (diff) |
leds-toggle-mode: toggle in one call...
... and drop the condition.
-rw-r--r-- | leds-toggle-mode.rsc | 6 |
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 ]); |