Ebbe Baß
5f8ab10325
Signed-off-by: Ebbe Baß <ebbe@ping-mee.de> |
||
---|---|---|
.gitignore | ||
GPIO Pin.png | ||
LICENSE | ||
README.md | ||
main-old.py | ||
main.py | ||
requirements.txt | ||
start.sh |
README.md
GPIO pin setup
Install Python script as service
Requirements:
- systemd (sudo apt install systemd -y)
Create service file:
sudo nano /etc/systemd/system/server-rack-led.service
Content in the service file:
[Unit]
Description=Server Rack LED
After=multi-user.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/python3 /home/pi/server-rack-led/main.py
[Install]
WantedBy=multi-user.target
Reload daemon, enable service and start service:
sudo systemctl daemon-reload
sudo systemctl enable server-rack-led.service
sudo systemctl start server-rack-led.service