From d5e4917414be808cc1d637e1535fc67395bfa4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Anguita=20L=C3=B3pez?= Date: Tue, 10 Jun 2025 16:46:57 +0200 Subject: [PATCH] change the output when checking if the cert tool exists --- indexer-certs-creator/config/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indexer-certs-creator/config/entrypoint.sh b/indexer-certs-creator/config/entrypoint.sh index 51aedbcd..fa098c50 100644 --- a/indexer-certs-creator/config/entrypoint.sh +++ b/indexer-certs-creator/config/entrypoint.sh @@ -12,8 +12,8 @@ PACKAGES_URL=https://packages.wazuh.com/4.14/ PACKAGES_DEV_URL=https://packages-dev.wazuh.com/4.14/ ## Check if the cert tool exists in S3 buckets -CERT_TOOL_PACKAGES=$(curl --silent -I $PACKAGES_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}') -CERT_TOOL_PACKAGES_DEV=$(curl --silent -I $PACKAGES_DEV_URL$CERT_TOOL | grep -E "^HTTP" | awk '{print $2}') +CERT_TOOL_PACKAGES=$(curl --silent --head --location --output /dev/null --write-out "%{http_code}" "$PACKAGES_URL$CERT_TOOL") +CERT_TOOL_PACKAGES_DEV=$(curl --silent --head --location --output /dev/null --write-out "%{http_code}" "$PACKAGES_DEV_URL$CERT_TOOL") ## If cert tool exists in some bucket, download it, if not exit 1 if [ "$CERT_TOOL_PACKAGES" = "200" ]; then