Add example service file

This commit is contained in:
2025-11-02 11:19:44 +00:00
parent a0fbd9308c
commit 01ff4dcd9e
2 changed files with 15 additions and 1 deletions

View File

@@ -4,4 +4,4 @@ MQTT bridge for BLE Nordic Instruments Thingy:52.
## Usage
Update the parameters found in `app.py` and run it with `python3 app.py`.
Update the parameters found in `app.py` and run it with `python3 app.py`. To run the app as a service, copy `thingy52-bridge.service` to `/etc/systemd/system/` and edit the path to `app.py` within it.

14
thingy52-bridge.service Normal file
View File

@@ -0,0 +1,14 @@
[Unit]
Description=Bridge Thingy:52 to MQTT
Wants=network-online.target
After=network.target network-online.target
[Service]
Type=simple
User=service
ExecStart=python3 /path/to/thingy52-mqtt-bridge/app.py
Restart=on-failure
RestartSec=10s
[Install]
WantedBy=multi-user.target