Add host routing service restart after VPN connects
Some checks failed
Test / test (push) Has been cancelled

SSH to host and restart rego-routing.service after VPN connection
is established in the VM.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-04 10:28:56 +00:00
parent 3e50f5a465
commit b55708721c

View File

@@ -609,6 +609,14 @@ start_anyconnect() {
# Setup forwarding # Setup forwarding
setup_forwarding setup_forwarding
# Restart host routing service
log INFO "Restarting host routing service..."
if ssh -o ConnectTimeout=5 -o BatchMode=yes root@ssh.alexzaw.dev systemctl restart rego-routing.service; then
log INFO "Host routing service restarted"
else
log WARN "Failed to restart host routing service"
fi
# Test connection # Test connection
log INFO "Testing connection to $TARGET_IP..." log INFO "Testing connection to $TARGET_IP..."
if ping -c 2 -W 3 "$TARGET_IP" &>/dev/null; then if ping -c 2 -W 3 "$TARGET_IP" &>/dev/null; then