diff --git a/install-stack.sh b/install-stack.sh index c8caf4e..6284964 100755 --- a/install-stack.sh +++ b/install-stack.sh @@ -483,7 +483,7 @@ wait_healthy() { local id=$1 url=$2 max=${3:-40} local i=0 while ! pct exec "$id" -- curl -sf --max-time 2 "$url" &>/dev/null; do - sleep 3; ((i++)) + sleep 3; i=$((i+1)) [[ $i -ge $max ]] && return 1 done return 0 @@ -493,7 +493,7 @@ wait_pg() { local max=30 i=0 while ! pct exec 100 -- bash -c \ "docker exec hotel-manage-postgres pg_isready -U postgres" &>/dev/null; do - sleep 3; ((i++)) + sleep 3; i=$((i+1)) [[ $i -ge $max ]] && { msg_warn "Postgres not ready after 90s"; return 1; } done } @@ -685,7 +685,7 @@ EOF # NPM admin API on port 81 — wait up to 60s local i=0 while ! pct exec 103 -- curl -sf --max-time 3 "http://localhost:81/api/" &>/dev/null; do - sleep 3; ((i++)); [[ $i -ge 20 ]] && break + sleep 3; i=$((i+1)); [[ $i -ge 20 ]] && break done msg_ok "NPM running — admin UI at http://${NPM_LAN_IP}:81" msg_warn "NPM default login: admin@example.com / changeme (change immediately!)" @@ -774,7 +774,7 @@ configure_npm_proxy_hosts() { local i=0 while ! curl -sf --max-time 3 "http://${NPM_LAN_IP}:81/api/" &>/dev/null; do - sleep 3; ((i++)) + sleep 3; i=$((i+1)) [[ $i -ge 30 ]] && { msg_warn "NPM API not responding — configure proxy hosts manually"; return; } done