packet:xrouter-service
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| packet:xrouter-service [2025/01/21 23:32] – Corrected spelling and grammar ei9iub | packet:xrouter-service [2025/10/21 10:56] (current) – g7taj | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== XRouter running as a systemd service ====== | ||
| + | |||
| + | |||
| As XRouter is distributed as a loose binary, a little work is needed to get it set up as a service. | As XRouter is distributed as a loose binary, a little work is needed to get it set up as a service. | ||
| Line 55: | Line 58: | ||
| More information on ACCESS.SYS config can be found on the [[https:// | More information on ACCESS.SYS config can be found on the [[https:// | ||
| + | Working example: | ||
| + | |||
| + | < | ||
| + | # cat / | ||
| + | [Unit] | ||
| + | StartLimitIntervalSec=5 | ||
| + | Description=XRpi service | ||
| + | After=network.target | ||
| + | StartLimitIntervalSec=0 | ||
| + | |||
| + | [Service] | ||
| + | Type=forking | ||
| + | Restart=always | ||
| + | RestartSec=5 | ||
| + | User=xr | ||
| + | WorkingDirectory=/ | ||
| + | ExecStart=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ====== G7TAJ way of retaining console access ====== | ||
| + | |||
| + | |||
| + | I do it like this | ||
| + | |||
| + | Create a user xrpi | ||
| + | Make sure the xrpi files are read/ | ||
| + | I change the owner to them and group to pi. | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | create a file : | ||
| + | < | ||
| + | |||
| + | < | ||
| + | [Unit] | ||
| + | StartLimitIntervalSec=5 | ||
| + | Description=XRpi service | ||
| + | After=network.target | ||
| + | StartLimitIntervalSec=0 | ||
| + | |||
| + | [Service] | ||
| + | Type=forking | ||
| + | Restart=always | ||
| + | RestartSec=5 | ||
| + | User=pi | ||
| + | ExecStart=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | </ | ||
| + | |||
| + | create the start-xrpi.sh script called above | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | cd / | ||
| + | ./xrpi | ||
| + | </ | ||
| + | |||
| + | enable the service | ||
| + | < | ||
| + | |||
| + | |||
| + | start it | ||
| + | < | ||
| + | |||
| + | |||
| + | Then, to get to xrpi, just do a < | ||
| + | |||
| + | To get out, < | ||
packet/xrouter-service.1737502359.txt.gz · Last modified: by ei9iub
