Created
September 4, 2019 16:59
-
-
Save djptek/0ec19a3e6229904451fd492671f9785e to your computer and use it in GitHub Desktop.
Bash snippet to wait for local node to be elected master before proceeding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while [ ${NODENAME} != ""`curl -s ${HOSTNAME}:9200/_cat/master\?h=node` ] ; | |
do echo "waiting for ${NODENAME} to elect itself master" ; | |
sleep 5 ; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment