Go to file
Ebbe Baß 3138b9f51c changed some stuff in start.sh 2022-03-26 20:26:34 +01:00
.gitignore Update .gitignore 2021-11-09 17:25:31 +01:00
GPIO Pin.png Create GPIO Pin.png 2021-11-09 14:55:54 +01:00
LICENSE Initial commit 2021-11-08 20:35:03 +00:00
README.md Updated README 2022-03-11 10:32:39 +00:00
debug-client.py added socket server 2022-03-26 20:14:20 +01:00
main.py added socket server 2022-03-26 20:14:20 +01:00
start.sh changed some stuff in start.sh 2022-03-26 20:26:34 +01:00
test-client.py added socket server 2022-03-26 20:14:20 +01:00
test-server.py added socket server 2022-03-26 20:14:20 +01:00

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