[fix](trx-rs): correct systemd network ordering
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user