Created
June 29, 2018 09:34
-
-
Save dbrgn/bfad33a3fed5a1e4b06c6a58080c3827 to your computer and use it in GitHub Desktop.
Example: Shutdown script for iC880A backplane
To install this script, copy the Python script to /usr/local/bin/button-shutdown.py
and the service file to /etc/systemd/system/button-shutdown.service
.
Then, reload systemd (or alternatively reboot the Raspberry Pi):
sudo systemctl daemon-reload
Now you can start and enable (=autostart) the service:
sudo systemctl enable button-shutdown
sudo systemctl start button-shutdown
To see the current status of the service, type:
sudo systemctl status button-shutdown
To see the logs:
sudo journalctl -u button-shutdown
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
To help people (like me) whom have an error with RPi.GPio not Found, you can install GPio with the line below :
sudo apt-get -y install python3-rpi.gpio
Hope it will help somebody !