Move restart-routing trigger into setup_forwarding
Some checks failed
Test / test (push) Has been cancelled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-16 23:16:29 +00:00
parent 6097bcbe8f
commit 2f7a51d2b7

View File

@@ -374,6 +374,17 @@ setup_forwarding() {
log INFO "Forwarding rules configured"
echo ""
# Trigger host routing service restart
log INFO "Triggering host routing service restart..."
touch /runtime/restart-routing
sleep 2
if [ ! -f /runtime/restart-routing ]; then
log INFO "Host routing service restarted"
else
log WARN "Host watcher may not be running (trigger file still exists)"
fi
log INFO "Container should now be able to reach $TARGET_IP through this VM"
echo ""
}
@@ -618,16 +629,6 @@ start_anyconnect() {
# Setup forwarding
setup_forwarding
# Trigger host routing service restart via file
log INFO "Triggering host routing service restart..."
touch /runtime/restart-routing
sleep 2
if [ ! -f /runtime/restart-routing ]; then
log INFO "Host routing service restarted"
else
log WARN "Host watcher may not be running (trigger file still exists)"
fi
# Test connection
log INFO "Testing connection to $TARGET_IP..."
if ping -c 2 -W 3 "$TARGET_IP" &>/dev/null; then