From 507e46da171edf7b0b0718e769b65e2dbd884762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 2 Jul 2022 22:45:48 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9EREADME.md=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index cdf19cf..a723870 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,10 @@ -# Install Python script as service +# Start on (re)boot -Requirements: -- systemd (sudo apt install systemd -y) +`sudo apt install screen -y` -Create service file: -`sudo nano /etc/systemd/system/server-rack-led.service` +`sudo crontab -e` -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 -``` +`@reboot /path/to/start.sh` \ No newline at end of file