Updated README
parent
45542de108
commit
2e50c2dcd7
20
README.md
20
README.md
|
@ -9,3 +9,23 @@ Requirements:
|
||||||
|
|
||||||
Create service file:
|
Create service file:
|
||||||
`sudo nano /etc/systemd/system/server-rack-led.service`
|
`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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue