From aa9cd6f6a45cd9a4a85d6912f360b32c170f8528 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 24 Mar 2026 23:56:01 +0200 Subject: wg1-setup: enable wg-quick@wg1 on boot so WireGuard survives VM reboots Previously the setup script only started the service (systemctl start), leaving it disabled. After a reboot WireGuard would not come up automatically, breaking the tunnel. Now uses systemctl enable before start so the service is active across reboots. Co-Authored-By: Claude Sonnet 4.6 --- wg1-setup.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wg1-setup.sh b/wg1-setup.sh index 67f139d..7307a76 100755 --- a/wg1-setup.sh +++ b/wg1-setup.sh @@ -343,9 +343,10 @@ fi REMOTE_SCRIPT print_success "Ollama configured" -echo "Starting wg1 on hyperstack..." -retry_ssh ssh_vm "sudo systemctl start wg-quick@wg1 2>/dev/null || sudo wg-quick up wg1" -print_success "wg1 started on hyperstack" +echo "Enabling and starting wg1 on hyperstack..." +# Enable ensures wg-quick@wg1 starts automatically on reboot. +retry_ssh ssh_vm "sudo systemctl enable wg-quick@wg1 && sudo systemctl start wg-quick@wg1 2>/dev/null || sudo wg-quick up wg1" +print_success "wg1 enabled and started on hyperstack" echo "" echo "=== Setting up earth (local) ===" -- cgit v1.2.3