From 2f7a51d2b7046e3805d4b60d650401c27fd2f3cd Mon Sep 17 00:00:00 2001 From: alexz Date: Fri, 16 Jan 2026 23:16:29 +0000 Subject: [PATCH] Move restart-routing trigger into setup_forwarding Co-Authored-By: Claude Opus 4.5 --- apps/rego-tunnel/shared/cisco-vpn | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/rego-tunnel/shared/cisco-vpn b/apps/rego-tunnel/shared/cisco-vpn index f8a176e..c221743 100755 --- a/apps/rego-tunnel/shared/cisco-vpn +++ b/apps/rego-tunnel/shared/cisco-vpn @@ -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