Automatically Turn Off the LEDs on Raspberry Pi
Raspberry Pi is my little busy-bee, working as a torrentbox and a Nextcloud server, among other things. But man, those blinking LEDs are not good for your sleep. So, I have written a small script with a systemd service to keep the LEDs turned off at night. You can find it at my Gitlab page. Enabling it on your own Raspberry is as easy as 1-2-3:
- First, download the script with
git clone https://gitlab.com/radek-sprta/automate-raspberry-leds
(you might have to installgit
first). - Then copy
raspberry-leds.sh
to/usr/local/bin
. - And make it executable with
sudo chmod +x /usr/local/bin/raspberry-leds.sh
. - Afterwards,
raspberry-leds.service
andraspberry-leds.timer
to/etc/systemd/system/multi-user.target.wants
. - Finally, run
sudo systemctl daemon-reload
.
Well, that was more like 1-2-3-4-5. But still pretty easy I would say. No more blinking lights bothering you at night anymore. Yay!