Update DEVELOPMENT.md

Add example systemd script to run the service automatically in Linux
pull/1/head
noah 2023-09-09 18:26:09 -04:00 zatwierdzone przez GitHub
rodzic c540eb2009
commit fca289d50e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 18 dodań i 0 usunięć

Wyświetl plik

@ -83,3 +83,21 @@ INFO:meshtastic.matrix.relay:Processing inbound radio message from !613501e4 on
INFO:meshtastic.matrix.relay:Relaying Meshtastic message from Alice to Matrix: [Alice/VeryCoolMeshnet]: Hey Bob!
INFO:meshtastic.matrix.relay:Sent inbound radio message to matrix room: #someroomid:example.matrix.org
```
## Persistence
If you'd like the bridge to run automatically on startup in Linux, you can set up a systemd service.
```
[Unit]
Description=A Meshtastic to [matrix] bridge
After=multi-user.target
[Service]
Type=idle
WorkingDirectory=/home/$USER/meshtastic-matrix-relay
ExecStart=/home/$USER/meshtastic-matrix-relay/.pyenv/bin/python /home/$USER/meshtastic-matrix-relay/main.py
[Install]
WantedBy=multi-user.target
```
In this example, it is assumed that you cloned the git repo into a user's home directory, and set up the venv according to the above.