Recently I have moved my router from one place in a house to another and got a new distraction: it's fast blinking LEDs right into my face. Pressed the mode button on the back and I was expecting them to turn off but to my surprise, nothing happened.

Fortunately, I had a backup of the config thanks to my backup routine. Yeah, there are many sources for this script and it even came with my Chateau 5G ax but after the hard reset, the script is gone. Since I cannot read that nor would I have been able come up with that from my own mind, so I decided to paste it here:

/system routerboard mode-button
set enabled=yes on-event=dark-mode
/system script
add comment=defconf dont-require-permissions=no name=dark-mode owner=\
    CHANGE_USERNAME_HERE policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
    if ([system leds settings get all-leds-off] = \"never\") do={\
    \n    /system leds settings set all-leds-off=immediate \
    \n} else={\
    \n    /system leds settings set all-leds-off=never\
    \n}"

It does exactly what it says, toggle all the LEDs on or off by pressing a programmable button on my router. Enjoy!