Mono-Documentation: Document how VRS can be run as system service.
I think many users - especially in the Linux domain - want to run the vr server as a system service/daemon. This can be achieved by creating a file /etc/systemd/system/virtualradar.service with the following content:
[Unit]
Description=Virtual Radar Server ADS-B Plotter
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/mono <absolute Path>/VirtualRadar/VirtualRadar.exe -nogui
Restart=on-failure
RestartSec=10
KillMode=process
User=<vrs-user>
Group=<vrs-group>
[Install]
WantedBy=multi-user.target
The <absolute Path>,
Call sudo systemctl daemon-reload to let systemd get aware of the new file.
You can now start / stop VRS by issuing sudo service virtualradar start/stop, sudo service virtualradar status shows thew current status of the server including the last lines logged to console.
To enable automatic start of the service at system startup: sudo systemctl enable virtualradar
Debian 10/11
[Service] Type=simple ExecStart=/usr/bin/mono <absolute Path>/VirtualRadar/VirtualRadar.exe -nogui Restart=on-failure RestartSec=5 KillMode=process User=root Group=root
[Install] WantedBy=multi-user. Target