added systemd job
This commit is contained in:
parent
dfba150bd6
commit
5ccf70028a
@ -34,6 +34,14 @@ TTN LoRa frequency / region
|
|||||||
|
|
||||||
`pip3 install paho-mqtt`
|
`pip3 install paho-mqtt`
|
||||||
|
|
||||||
|
- `mkdir /opt/msv-clubhouse-backend/`
|
||||||
|
- `cd /opt/msv-clubhouse-backend/`
|
||||||
|
- import `msv_clubhouse_backend.py` and `config.py`
|
||||||
|
- Set the constants in `config.py`
|
||||||
|
- `chmod +x /opt/msv-clubhouse-backend/msv_clubhouse_backend.py`
|
||||||
|
- `chown -R prometheus /opt/msv-clubhouse-backend/`
|
||||||
|
- `nano /etc/systemd/system/msv-clubhouse-backend.service`
|
||||||
|
- `systemctl daemon-reload && systemctl enable --now msv-clubhouse-backend.service`
|
||||||
|
|
||||||
JS Payload Formatter:
|
JS Payload Formatter:
|
||||||
|
|
||||||
|
15
msv-clubhouse-backend.service
Normal file
15
msv-clubhouse-backend.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=MSV-Clubhouse-Backend
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=oneshot
|
||||||
|
User=prometheus
|
||||||
|
Group=prometheus
|
||||||
|
WorkingDirectory=/opt/msv-clubhouse-backend/
|
||||||
|
ExecStart=/usr/bin/python3 /opt/msv-clubhouse-backend/msv_clubhouse_backend.py
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user