Skip to content

Instantly share code, notes, and snippets.

@tekton
Created November 8, 2015 07:45
Show Gist options
  • Save tekton/871b8126773b7ce36e0c to your computer and use it in GitHub Desktop.
Save tekton/871b8126773b7ce36e0c to your computer and use it in GitHub Desktop.
Wait for a local redis slave, then start your app!
!/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