Skip to content

Commit

Permalink
Document how to run the project as a service
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgzhg committed Jan 4, 2024
1 parent ef582f2 commit 434d0f9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,23 @@ to use its **latest** version.
* To get the supported CLI options:
* `./LoRaPktFwrd -h`

### Running LoRa UDP Packet Forwarder as a System Service

This project can be installed as a Systemd service (refer to file `LoRaPktFwrd.service`) which optionally may start automatically after the system boots.
As a prerequisite make sure the project is compiled (via the `make` command) and it is able to execute correctly with your own `config.json` file.

* To install the LoRaPktFwrd service you can execute `sudo make install`
* To uninstall the service use `sudo make uninstall`
* To allow the service to run automatically after the system boots: `sudo systemctl enable LoRaPktFwrd.service`
* To disallow the service to run automatically after the system boots: `sudo systemctl disable LoRaPktFwrd.service`
* To manually start / restart/ stop the service:
```
sudo service LoRaPktFwrd start
sudo service LoRaPktFwrd restart
sudo service LoRaPktFwrd stop
```
* To inspect the latest logs of the service: `sudo journalctl -n 100 -f -u LoRaPktFwrd.service`


## Dependencies

Expand Down

0 comments on commit 434d0f9

Please sign in to comment.