From d24d108a5b4551a16305a113e00f8e213b9c3ea5 Mon Sep 17 00:00:00 2001 From: FailedProxy Date: Tue, 24 Mar 2026 20:08:57 +0000 Subject: [PATCH] test --- common.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/common.sh b/common.sh index 681e4f1..b1c22cb 100644 --- a/common.sh +++ b/common.sh @@ -109,13 +109,16 @@ detect_hosts() { echo "Local server: $LOCAL_SERVER_NAME" echo "Remote server: $REMOTE_SERVER_NAME" - # Resolve Tailscale IP - REMOTE_SERVER=$(tailscale ip -4 "$REMOTE_SERVER_NAME" 2>/dev/null) + REMOTE_SERVER=$(tailscale ip -4 "$REMOTE_SERVER_NAME" 2>/dev/null || true) - if [[ -z "$REMOTE_SERVER" ]]; then - echo "Error: Could not resolve Tailscale IP for $REMOTE_SERVER_NAME" - exit 1 - fi +if [[ -z "$REMOTE_SERVER" ]]; then + echo "Error: Could not resolve Tailscale IP for $REMOTE_SERVER_NAME" + echo "Debug: tailscale status:" + tailscale status 2>/dev/null || echo "tailscale not available" + exit 1 +fi + +echo "Resolved $REMOTE_SERVER_NAME → $REMOTE_SERVER" # SSH Key Mapping (kept here for stability) declare -A SSH_KEYS