# SPDX-FileCopyrightText: 2026 Stan Grams # # SPDX-License-Identifier: GPL-2.0-or-later # # systemd *user* unit for the trx-rs radio server. # # Install with `script/install.sh` (which substitutes @BINDIR@ and copies this # into ~/.config/systemd/user/), or by hand: # sed 's|@BINDIR@|/usr/local/bin|' trx-server.service \ # > ~/.config/systemd/user/trx-server.service # systemctl --user daemon-reload # systemctl --user enable --now trx-server.service # # Reads the combined config at ~/.config/trx-rs/trx-rs.toml ([trx-server] # section). Serial (/dev/ttyUSB*) and audio access require your user to be in # the `dialout` and `audio` groups — a user unit cannot grant them itself. [Unit] Description=trx-rs radio server (CAT/SDR backend) Documentation=https://github.com/stanislawgrams/trx-rs # The server binds its control/audio TCP listeners and may connect to networked # rigs and reporting services, so do not start it before networking is ready. Wants=network-online.target After=network-online.target [Service] Type=simple ExecStart=@BINDIR@/trx-server --config %h/.config/trx-rs/trx-rs.toml Restart=on-failure RestartSec=2 # Both binaries shut down cleanly on SIGINT (the server drains audio and exits # 0); systemd's default SIGTERM is not handled, so signal SIGINT instead. KillSignal=SIGINT TimeoutStopSec=15 NoNewPrivileges=true [Install] WantedBy=default.target