Hi,
You can turn off the LEDS via command line. Also, you can put those commands into crontab to execute at your desired times.
The following two commands stop and start LED service on the device, respectively:
- /etc/init.d/ledman stop
- /etc/init.d/ledman start
Two commands to disable and enable LED on port 1 of the device (port 0, you can change to 1, 2, etc.):
- swconfig dev switch0 port 0 set led 0
- swconfig dev switch0 port 0 set led 2
To add these commands to crontab, execute the following command:
It will open in text editor. Press 'i' to start editing. To run disable LEDs at 22 PM and enable them at 7 AM, add the following:
0 22 * * * /etc/init.d/ledman stop >/dev/null 2>&1
0 7 * * * /etc/init.d/ledman start >/dev/null 2>&1
0 22 * * * swconfig dev switch0 port 0 set led 0 >/dev/null 2>&1
0 7 * * * swconfig dev switch0 port 0 set led 2 >/dev/null 2>&1
Save your changes by pressing 'esc' button, typing ':wq' and pressing 'enter'
You can change the times if you want. More information about crontab can be found here. You can also use crontab generator like the one here.
Kind Regards,
Andzej