From ee9060e6d0707194d11f7d9278bf5ae0bc340df3 Mon Sep 17 00:00:00 2001 From: 28allday Date: Sat, 6 Jun 2026 13:32:25 +0100 Subject: [PATCH] install.sh: don't die when no tailscale interface exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under set -euo pipefail, the TS_IFACE detection pipeline killed the whole script when grep matched nothing — i.e. on every box without a tailscaleN interface (containers under userspace networking, or no tailscale at all). Everything after the agent-context step was silently skipped: firewall advice, the public-IP warning, the new proxy check. Latent since v0.1.8; first surfaced on a real container install. Guard the receiveDir extraction the same way. Co-Authored-By: Claude Opus 4.8 (1M context) --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f1ef064..d85855f 100755 --- a/install.sh +++ b/install.sh @@ -269,7 +269,7 @@ mkdir -p "$CFG_DIR" RECV_DIR="$HOME/Omarchy-Send" if [ -f "$CFG_DIR/config.json" ]; then _rd="$(grep -oE '"receiveDir"[[:space:]]*:[[:space:]]*"[^"]*"' "$CFG_DIR/config.json" \ - | sed -E 's/.*:[[:space:]]*"([^"]*)"/\1/' | head -n1)" + | sed -E 's/.*:[[:space:]]*"([^"]*)"/\1/' | head -n1 || true)" [ -n "${_rd:-}" ] && RECV_DIR="$_rd" fi @@ -366,7 +366,7 @@ echo " Added an Omarchy-Send section to $CLAUDE_MD." # # Tailscale interface: usually tailscale0, but absent when tailscaled runs in # userspace-networking mode (the default inside containers) — don't hardcode it. -TS_IFACE="$(ip -o link show 2>/dev/null | grep -oE 'tailscale[0-9]+' | head -n1)" +TS_IFACE="$(ip -o link show 2>/dev/null | grep -oE 'tailscale[0-9]+' | head -n1 || true)" # Container? Under Docker host-networking the port binds the *host's* stack, and # the firewall belongs on the host, not in this namespace.