install.sh: don't die when no tailscale interface exists
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) <noreply@anthropic.com>
This commit is contained in:
parent
05e70f127d
commit
ee9060e6d0
1 changed files with 2 additions and 2 deletions
|
|
@ -269,7 +269,7 @@ mkdir -p "$CFG_DIR"
|
||||||
RECV_DIR="$HOME/Omarchy-Send"
|
RECV_DIR="$HOME/Omarchy-Send"
|
||||||
if [ -f "$CFG_DIR/config.json" ]; then
|
if [ -f "$CFG_DIR/config.json" ]; then
|
||||||
_rd="$(grep -oE '"receiveDir"[[:space:]]*:[[:space:]]*"[^"]*"' "$CFG_DIR/config.json" \
|
_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"
|
[ -n "${_rd:-}" ] && RECV_DIR="$_rd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -366,7 +366,7 @@ echo " Added an Omarchy-Send section to $CLAUDE_MD."
|
||||||
#
|
#
|
||||||
# Tailscale interface: usually tailscale0, but absent when tailscaled runs in
|
# Tailscale interface: usually tailscale0, but absent when tailscaled runs in
|
||||||
# userspace-networking mode (the default inside containers) — don't hardcode it.
|
# 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
|
# Container? Under Docker host-networking the port binds the *host's* stack, and
|
||||||
# the firewall belongs on the host, not in this namespace.
|
# the firewall belongs on the host, not in this namespace.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue