From f0459bef3223c7ad575b0c0970b7fd6a08202f4c Mon Sep 17 00:00:00 2001 From: Fidel Ramos Date: Wed, 30 Sep 2026 18:15:06 +0100 Subject: [PATCH] fix(blocky): restart on failure and wait for network-online (#17601) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The systemd service unit created by install/blocky-install.sh has After=network.target and no restart policy. On a container where blocky binds to a static IP and the interface is not yet configured when the unit starts, blocky exits once with "bind: cannot assign requested address" and stays dead. This was observed on Debian 13 LXC / PVE 9 after a host reboot: internal DNS was down until a manual restart. Two fixes: 1. [Unit] After=/Wants=network-online.target: standard ordering, prevents the start before the network is usable where a wait-online provider exists. 2. [Service] Restart=on-failure + RestartSec=5: matches the existing Restart=on-failure in install/traefik-install.sh; the 5s spacing also overrides systemd's default start-rate limit (5 starts / 10 s) from ending retries. Verification: 1. Container reboot → blocky active with no manual intervention 2. SIGKILL → auto-restart within the restart interval Co-authored-by: Fidel Ramos --- install/blocky-install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 0e28f89f1..2bd37bd91 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -67,11 +67,16 @@ msg_info "Creating Service" cat </etc/systemd/system/blocky.service [Unit] Description=Blocky -After=network.target +After=network-online.target +Wants=network-online.target + [Service] User=root WorkingDirectory=/opt/blocky +Restart=on-failure +RestartSec=5 ExecStart=/opt/blocky/./blocky --config config.yml + [Install] WantedBy=multi-user.target EOF