From 3a19f133a712ea813d2028021e7c25cbc0d52f7f Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Wed, 26 Nov 2025 00:05:54 +0100 Subject: [PATCH] improve wireguard robustness --- scripts/image-builder/rpi-wireguard.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/image-builder/rpi-wireguard.sh b/scripts/image-builder/rpi-wireguard.sh index da7b101..3236a74 100644 --- a/scripts/image-builder/rpi-wireguard.sh +++ b/scripts/image-builder/rpi-wireguard.sh @@ -140,12 +140,11 @@ apt-get install -y wireguard wireguard-tools echo "Enabling Wireguard service..." systemctl enable wg-quick@wg0 -systemctl start wg-quick@wg0 - -echo "Wireguard setup complete!" -wg show +echo "Wireguard installation complete!" rm /root/setup-wireguard.sh + +systemctl start wg-quick@wg0 || true SETUP_SCRIPT sudo chmod +x /mnt/rpi-root/root/setup-wireguard.sh @@ -155,12 +154,12 @@ sudo tee /mnt/rpi-root/etc/systemd/system/wireguard-first-boot.service > /dev/nu Description=Setup Wireguard on first boot After=network-online.target Wants=network-online.target -Before=wg-quick@wg0.service [Service] Type=oneshot ExecStart=/root/setup-wireguard.sh RemainAfterExit=yes +TimeoutStartSec=300 [Install] WantedBy=multi-user.target