Skip to content

Instantly share code, notes, and snippets.

@h4de5
Last active December 9, 2020 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h4de5/6011243740ba7ab9ddf36a3f0f1b3aef to your computer and use it in GitHub Desktop.
Save h4de5/6011243740ba7ab9ddf36a3f0f1b3aef to your computer and use it in GitHub Desktop.
disable leds on rpi3 - when config.txt modification do not work.
[Unit]
Description=Disable leds
After=network-online.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c '/bin/echo "none" > /sys/class/leds/led0/trigger'
ExecStart=/bin/sh -c '/bin/echo "0" > /sys/class/leds/led0/brightness'
ExecStart=/bin/sh -c '/bin/echo "none" > /sys/class/leds/led1/trigger'
ExecStart=/bin/sh -c '/bin/echo "0" > /sys/class/leds/led1/brightness'
User=root
Group=root
[Install]
WantedBy=multi-user.target
@h4de5
Copy link
Author

h4de5 commented Dec 9, 2020

install

cp ledsoff.service /etc/systemd/system/
systemctl enable ledsoff
systemctl start ledsoff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment