From b38f02eae3fee2d28a2a48cfc7ae78050aa72123 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Mon, 13 Apr 2026 17:58:32 +0200 Subject: [PATCH] fix(installer): fix ClickHouse health check and normalize hostname - ClickHouse health check: use $CLICKHOUSE_PASSWORD directly instead of extracting from .env via grep (nested quoting broke in eval) - Normalize auto-detected hostname to lowercase (Windows returns uppercase which causes OIDC issuer case mismatches) Co-Authored-By: Claude Opus 4.6 (1M context) --- installer/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/installer/install.sh b/installer/install.sh index 93bd505..c2b6efb 100644 --- a/installer/install.sh +++ b/installer/install.sh @@ -353,6 +353,8 @@ check_port_available() { auto_detect() { if [ -z "$PUBLIC_HOST" ]; then PUBLIC_HOST=$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo "localhost") + # Normalize to lowercase (Windows hostnames are uppercase) + PUBLIC_HOST=$(echo "$PUBLIC_HOST" | tr '[:upper:]' '[:lower:]') local primary_ip primary_ip=$(ip route get 1.1.1.1 2>/dev/null | awk '{print $7; exit}' || true) if [ -n "$primary_ip" ]; then @@ -929,7 +931,7 @@ verify_health() { 120 || failed=1 [ $failed -eq 0 ] && check_service_health "ClickHouse" \ - "cd '$INSTALL_DIR' && docker compose -p '$COMPOSE_PROJECT' exec -T clickhouse clickhouse-client --password \"\$(grep CLICKHOUSE_PASSWORD '$INSTALL_DIR/.env' | cut -d= -f2)\" --query 'SELECT 1'" \ + "cd '$INSTALL_DIR' && docker compose -p '$COMPOSE_PROJECT' exec -T clickhouse clickhouse-client --password '$CLICKHOUSE_PASSWORD' --query 'SELECT 1'" \ 120 || failed=1 [ $failed -eq 0 ] && check_service_health "Logto" \