From 2e50c2dcd703e534a4479b9ac86d10a81edda57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 11 Mar 2022 10:31:34 +0000 Subject: [PATCH] Updated README --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b367a70..0af2491 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,24 @@ Requirements: - systemd (sudo apt install systemd -y) Create service file: -`sudo nano /etc/systemd/system/server-rack-led.service` \ No newline at end of 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 +```