[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] [Unit]
Description=trx-rs radio client and web frontend Description=trx-rs radio client and web frontend
Documentation=https://github.com/stanislawgrams/trx-rs Documentation=https://github.com/stanislawgrams/trx-rs
# Prefer the server to be up first; it is a soft dependency so the client still # Wait for networking and, when it is enabled, the local server. After= only
# starts (and retries) if the server is managed separately. # orders units already in the transaction: it deliberately does not start a
Wants=trx-server.service # disabled trx-server, since the client may connect to a remote server instead.
After=trx-server.service Wants=network-online.target
After=network-online.target trx-server.service
[Service] [Service]
Type=simple Type=simple
@@ -32,6 +33,9 @@ RestartSec=2
KillSignal=SIGINT KillSignal=SIGINT
TimeoutStopSec=15 TimeoutStopSec=15
NoNewPrivileges=true 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] [Install]
WantedBy=default.target WantedBy=default.target
+7
View File
@@ -18,6 +18,10 @@
[Unit] [Unit]
Description=trx-rs radio server (CAT/SDR backend) Description=trx-rs radio server (CAT/SDR backend)
Documentation=https://github.com/stanislawgrams/trx-rs 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] [Service]
Type=simple Type=simple
@@ -29,6 +33,9 @@ RestartSec=2
KillSignal=SIGINT KillSignal=SIGINT
TimeoutStopSec=15 TimeoutStopSec=15
NoNewPrivileges=true NoNewPrivileges=true
# Permit local IPC plus IPv4/IPv6 listening and outbound connections. Ports
# are configuration-defined, so SocketBindAllow= cannot safely narrow them.
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
[Install] [Install]
WantedBy=default.target WantedBy=default.target