summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-24 23:56:01 +0200
committerPaul Buetow <paul@buetow.org>2026-03-24 23:56:01 +0200
commitaa9cd6f6a45cd9a4a85d6912f360b32c170f8528 (patch)
tree5342abe17a25d7df5ee404bfaf3166535c1f8754
parent5ec7da198ec4010bddca997699e02274b7b85613 (diff)
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 <noreply@anthropic.com>
-rwxr-xr-xwg1-setup.sh7
1 files 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) ==="