[fix](trx-rs): correct systemd network ordering
CI / lint (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / reuse (push) Canceled after 0s

Let the client wait for an enabled local server without activating a disabled one, and declare the socket families required by both services for configured listeners and remote connections.

Assisted-By: OpenAI Codex (GPT-5)
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
sjg
2026-08-18 22:35:54 +02:00
parent 05c337b581
commit 110c0e1d49
2 changed files with 15 additions and 4 deletions
+8 -4
View File
@@ -18,10 +18,11 @@
[Unit]
Description=trx-rs radio client and web frontend
Documentation=https://github.com/stanislawgrams/trx-rs
# Prefer the server to be up first; it is a soft dependency so the client still
# starts (and retries) if the server is managed separately.
Wants=trx-server.service
After=trx-server.service
# Wait for networking and, when it is enabled, the local server. After= only
# orders units already in the transaction: it deliberately does not start a
# disabled trx-server, since the client may connect to a remote server instead.
Wants=network-online.target
After=network-online.target trx-server.service
[Service]
Type=simple
@@ -32,6 +33,9 @@ RestartSec=2
KillSignal=SIGINT
TimeoutStopSec=15
NoNewPrivileges=true
# The client opens outbound TCP connections to remote servers and binds TCP
# listeners for its configured HTTP, JSON, rigctl, and audio frontends.
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
[Install]
WantedBy=default.target