From a4c8008e7ed6b46a40bd4f072187db0287a660de Mon Sep 17 00:00:00 2001 From: Patrick762 <80690443+Patrick762@users.noreply.github.com> Date: Fri, 14 Jul 2023 17:30:09 +0200 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 32d7134..56b9735 100644 --- a/README.md +++ b/README.md @@ -47,3 +47,26 @@ Reboot your system Start the server: `streamdeckapi-server` + +### Example service +To run the server on startup, you can use the following config in the file `/etc/systemd/system/streamdeckapi.service`: + +```conf +[Unit] +Description=Stream Deck API Service +Wants=network-online.target +After=network.target + +[Service] +WorkingDirectory=/home/pi +ExecStart=/home/pi/.local/bin/streamdeckapi-server +User=pi +StandardOutput=console + +[Install] +WantedBy=multi-user.target +``` + +To start the service, run `sudo systemctl start streamdeckapi.service`. + +To enable the service, run `sudo systemctl enable streamdeckapi.service`.