fix: LND config escaping in SSH heredoc, Tailscale fallback for build source
- Fix shell escaping in LND config sync block (single-quoted SSH context doesn't need backslash-escaped dollars) - deploy-tailscale.sh BUILD_SOURCE auto-detects Tailscale IP when LAN unreachable (fixes "No binary on .228" error) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,18 @@ TARGET_DIR="/home/archipelago/archy"
|
||||
|
||||
SSH_KEY="${ARCHIPELAGO_SSH_KEY:-$HOME/.ssh/archipelago-deploy}"
|
||||
SSH_OPTS="-o StrictHostKeyChecking=no -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -o ConnectTimeout=10 -i $SSH_KEY"
|
||||
BUILD_SOURCE="archipelago@${DEFAULT_PRIMARY:-192.168.1.228}"
|
||||
BUILD_SOURCE_LAN="archipelago@${DEFAULT_PRIMARY:-192.168.1.228}"
|
||||
BUILD_SOURCE_TS="archipelago@$(tailscale status 2>/dev/null | grep 'archipelago-0' | awk '{print $1}')"
|
||||
# Try LAN first, fall back to Tailscale
|
||||
if ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -i "$SSH_KEY" "$BUILD_SOURCE_LAN" "echo ok" >/dev/null 2>&1; then
|
||||
BUILD_SOURCE="$BUILD_SOURCE_LAN"
|
||||
elif [ "$BUILD_SOURCE_TS" != "archipelago@" ] && ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -i "$SSH_KEY" "$BUILD_SOURCE_TS" "echo ok" >/dev/null 2>&1; then
|
||||
BUILD_SOURCE="$BUILD_SOURCE_TS"
|
||||
echo "Build source: using Tailscale IP (LAN unreachable)"
|
||||
else
|
||||
BUILD_SOURCE="$BUILD_SOURCE_LAN"
|
||||
echo "WARNING: Build source may be unreachable"
|
||||
fi
|
||||
BUILD_DIR="/home/archipelago/archy"
|
||||
|
||||
# Node registry
|
||||
|
||||
Reference in New Issue
Block a user