Table of Contents

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.

Sample systemd service

[Unit]
StartLimitIntervalSec=5
Description=XRpi service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=forking
Restart=always
RestartSec=5
User=xr
WorkingDirectory=/home/xr
ExecStart=/home/xr/xrpi64 -d

[Install]
WantedBy=multi-user.target

Network Access to XRouter from other subnets

XRouter uses a file called ACCESS.SYS in it's working directory to determine what rules are in place for accessing the instance - if it is present.

If you need to access the instance from another network, you will need to create the file and enter the network addresses and CIDR masks that you wish to permit.

e.g.

192.200.0.0/24 1

Syntax is as follows:

<subnet>[/bits] <access_flags>

The <access_flags> parameter is the sum of these flag values.

More information on ACCESS.SYS config can be found on the Ohio Packet documentation pages.

Working example:

# cat /etc/systemd/system/xrouter.service
[Unit]
StartLimitIntervalSec=5
Description=XRpi service
After=network.target
StartLimitIntervalSec=0

[Service]
Type=forking
Restart=always
RestartSec=5
User=xr
WorkingDirectory=/home/xr
ExecStart=/home/xr/xrlin64 -d

[Install]
WantedBy=multi-user.target