Last active
November 27, 2023 19:58
-
-
Save nikolaybotev/62e4d656f96aa2edec944f4c050e1184 to your computer and use it in GitHub Desktop.
systemd service to turn off Raspberry Pi LEDs on startup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Turn Off LED %i | |
After=network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/sh -c 'echo 0 > /sys/class/leds/%i/brightness' | |
ExecStop=/bin/sh -c 'echo 255 > /sys/class/leds/%i/brightness' | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick Setup
PWR
andACT
in the commands above withled0
andled1
if you are running an older versions of Raspberry Pi OS.