Skip to content

Commit

Permalink
Fix syntax error in elasticsearch healthcheck script
Browse files Browse the repository at this point in the history
  • Loading branch information
BendingBender authored Jun 18, 2024
1 parent f50797f commit c0c0056
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 c0c0056

Please sign in to comment.