diff --git a/headscale-auto-register.sh b/headscale-auto-register.sh index b20ce37..7f5070a 100755 --- a/headscale-auto-register.sh +++ b/headscale-auto-register.sh @@ -520,9 +520,9 @@ collect_pharmacy_info() { get_assigned_vpn_ip() { echo -e "${BLUE}VPN IP 확인 중...${NC}" - # tailscale status로 IP 추출 (최대 10초 대기) + # tailscale ip -4로 IP 추출 (최대 10초 대기) for i in {1..10}; do - VPN_IP=$(tailscale status --json 2>/dev/null | grep -oP '"TailscaleIPs":\["\K[^"]+' | head -1) + VPN_IP=$(tailscale ip -4 2>/dev/null) if [ -n "$VPN_IP" ]; then echo -e "${GREEN}✓ VPN IP: $VPN_IP${NC}"