Skip to content

Commit

Permalink
Merge pull request #114 from BendingBender/patch-1
Browse files Browse the repository at this point in the history
Fix syntax error in elasticsearch healthcheck script
  • Loading branch information
sherifabdlnaby committed Jun 18, 2024
2 parents f50797f + c0c0056 commit fd7f419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elasticsearch/scripts/docker-healthcheck
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eo pipefail

host="$(hostname --ip-address || echo '127.0.0.1')"

if health="$(curl -fsSL "https://$ELASTIC_USERNAME:$ELASTIC_PASSWORD@$host:$ELASTICSEARCH_PORT/_cat/health?h=status" --insecure")"; then
if health="$(curl -fsSL "https://$ELASTIC_USERNAME:$ELASTIC_PASSWORD@$host:$ELASTICSEARCH_PORT/_cat/health?h=status" --insecure)"; then
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
if [ "$health" = 'green' ] || [ "$health" = "yellow" ]; then
exit 0
Expand Down

0 comments on commit fd7f419

Please sign in to comment.