From 7fefca47c96d0b8461cf68ec1e9ae899c7d819e9 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 30 Nov 2024 11:42:46 +0100 Subject: [PATCH] feat: some more debugging Signed-off-by: kjuulh --- install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index fc4c477..b446a3c 100644 --- a/install.sh +++ b/install.sh @@ -35,17 +35,18 @@ curl -L "https://api-minio.front.kjuulh.io/${S3_BUCKET}/releases/${APP_NAME}/${A # Make binary executable chmod +x "${INSTALL_DIR}/${BINARY_NAME}" +echo "Starting churn agent setup..." res=$(churn agent setup --discovery "${CHURN_DISCOVERY}" 2>&1) exit_code=$? -echo "Debug - Full output: $res" -echo "Debug - Exit code: $exit_code" +echo "Command output: $res" +echo "Exit code: $exit_code" if [[ $exit_code != 0 ]]; then - # Convert to lowercase to make matching more reliable - res_lower=$(echo "$res" | tr '[:upper:]' '[:lower:]') - if [[ "$res_lower" != *"config file already exists"* ]] && [[ "$res_lower" != *"already exists"* ]]; then - echo "Error: $res" + if [[ "$res" != *"config file already exists"* ]] && [[ "$res" != *"already exists"* ]]; then + echo "Error detected: $res" exit 1 + else + echo "Ignoring expected 'already exists' error" fi fi