You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bashecho "awaiting ES"host="http://localhost:9200"# next wait for ES status to turn to yellowhealth="$(curl -fsSL "$host/_cat/health?h=status")"# health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")until [ "$health" = "green" ] || [ "$health" = "yellow" ]; do health="$(curl -fsSL "$host/_cat/health?h=status")" # health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") >&2 echo "Elastic Search is unavailable (health status is : $health and not green)- sleeping ..." sleep 1doneecho "ES is up $health"