CI / lint (pull_request) Canceled after 0s
CI / test (pull_request) Canceled after 0s
CI / frontend (pull_request) Canceled after 0s
CI / reuse (pull_request) Canceled after 0s
CI / lint (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / reuse (push) Canceled after 0s
Provide a one-shot installer and matching systemd *user* units so the
server and client can be built, installed system-wide, and run in the
background without hand-rolled steps.
- script/install.sh: builds all three binaries (trx-server, trx-client,
trx-configurator) in release mode and installs them to /usr/local/bin
(configurable via --prefix/--bindir/PREFIX, sudo only when the target
is not writable). Seeds ~/.config/trx-rs/trx-rs.toml from the example
without ever overwriting existing config, then installs the user units
with @BINDIR@ substituted to the real path and runs daemon-reload.
Flags: --no-sdr, --no-build, --no-systemd, --enable-now.
- script/uninstall.sh: stops/disables the units, removes them and the
binaries; keeps config unless --purge.
- packaging/systemd/{trx-server,trx-client}.service: user units reading
the combined config at ~/.config/trx-rs/trx-rs.toml. The client softly
depends on the server (Wants/After). KillSignal=SIGINT matches how the
binaries shut down cleanly (SIGTERM is not handled).
- README: new "Install (optional, Linux + systemd)" section.
The web UI assets are embedded in the binary, so an install needs only
the binaries plus a config file — no data directory to ship.
Signed-off-by: Stan Grams <sjg@haxx.space>
35 lines
1.2 KiB
Desktop File
35 lines
1.2 KiB
Desktop File
# SPDX-FileCopyrightText: 2026 Stan Grams <sjg@haxx.space>
|
|
#
|
|
# 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
|
|
|
|
[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
|