#!/bin/bash elastic_pass=$1 response="$(curl -u "elastic:${elastic_pass}" http://localhost:9200/_cluster/health)" health="$(echo "${response}" | jq -r '.status')" if [ "${health}" == "green" ]; then exit 0 else exit 1 fi