Add example service file
This commit is contained in:
@@ -4,4 +4,4 @@ MQTT bridge for BLE Nordic Instruments Thingy:52.
|
|||||||
|
|
||||||
## Usage
|
## 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
14
thingy52-bridge.service
Normal 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
|
||||||
Reference in New Issue
Block a user