kopia lustrzana https://github.com/mate-dev/meshtastic-matrix-relay
Update DEVELOPMENT.md
Updated systemd config with recommendations from https://github.com/geoffwhittington/meshtastic-matrix-relay/pull/57#pullrequestreview-1620383106pull/1/head
rodzic
fca289d50e
commit
335332f73b
|
@ -85,19 +85,26 @@ INFO:meshtastic.matrix.relay:Sent inbound radio message to matrix room: #someroo
|
|||
```
|
||||
|
||||
## Persistence
|
||||
If you'd like the bridge to run automatically on startup in Linux, you can set up a systemd service.
|
||||
If you'd like the bridge to run automatically (and persistently) on startup in Linux, you can set up a systemd service.
|
||||
In this example, it is assumed that you have the project a (non-root) user's home directory, and set up the venv according to the above.
|
||||
|
||||
Create the file ```~/.config/systemd/user/mmrelay.service```:
|
||||
```
|
||||
[Unit]
|
||||
Description=A Meshtastic to [matrix] bridge
|
||||
After=multi-user.target
|
||||
After=default.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
|
||||
WorkingDirectory=%h/meshtastic-matrix-relay
|
||||
ExecStart=%h/meshtastic-matrix-relay/.pyenv/bin/python %h/meshtastic-matrix-relay/main.py
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=default.target
|
||||
```
|
||||
The service is enabled and started by
|
||||
```
|
||||
$ systemctl --user enable mmrelay.service
|
||||
$ systemctl --user start mmrelay.service
|
||||
```
|
||||
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.
|
||||
|
|
Ładowanie…
Reference in New Issue