Created
November 8, 2015 07:45
-
-
Save tekton/871b8126773b7ce36e0c to your computer and use it in GitHub Desktop.
Wait for a local redis slave, then start your app!
This file contains 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 | |
X="`/opt/redis/redis-3.0.3/src/redis-cli ping`" | |
echo ${X} | |
while [ "${X}" != "PONG" ]; do | |
echo "redis slave not yet ready" | |
echo "${X}" | |
sleep 30 | |
X="`/opt/redis/redis-3.0.3/src/redis-cli ping`" | |
done | |
# then run start script, or call other bash file, etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment