From 286a97d68cea78fd816b26b17537854a2a90984b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Feb 2026 05:40:47 +0000 Subject: [PATCH] Fix clear and network check for curl pipe execution - Guard `clear` with terminal check so it doesn't fail when TERM is unset (common in curl pipe context) - Use curl instead of ping for network check (ICMP often blocked in LXC) - Fix ((tries++)) from 0 evaluating as falsy under set -e https://claude.ai/code/session_013gJJD3cxafQSVmyn9pXcdn --- scripts/proxmox/soulsync-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/proxmox/soulsync-install.sh b/scripts/proxmox/soulsync-install.sh index f4721622..3029348b 100755 --- a/scripts/proxmox/soulsync-install.sh +++ b/scripts/proxmox/soulsync-install.sh @@ -148,7 +148,7 @@ get_ip() { # -- Header -------------------------------------------------------------------- header_info() { - clear + [[ -t 1 ]] && clear 2>/dev/null || true echo "" cat <<"BANNER" ____ _ ____ @@ -199,14 +199,14 @@ arch_check() { network_check() { msg_info "Checking network connectivity" - local tries=0 - while ! ping -c 1 -W 3 github.com &>/dev/null; do - ((tries++)) + local tries=1 + while ! curl -fsSL --max-time 5 https://github.com >/dev/null 2>&1; do if [[ $tries -ge 3 ]]; then msg_error "No network connectivity (cannot reach github.com)" echo -e "${TAB}${DIM}Ensure your LXC has a working network configuration.${CL}" >&2 exit 1 fi + ((tries++)) || true sleep 2 done msg_ok "Network connectivity verified"