Upgrade elasticsearch to 7

This commit is contained in:
Marco Marcianesi 2020-04-22 18:59:59 +02:00
parent 948b2a33e6
commit 16949f3817
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@
set -eo pipefail
host="$(hostname --ip-address || echo '127.0.0.1')"
health="$(curl -fsSL "http://$host:9200/_cat/health?h=status")"
echo $health
if health="$(curl -fsSL "http://$host:9200/_cat/health?h=status")"; then
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
if [ "$health" = 'green' ]; then