Created
March 19, 2012 16:22
-
-
Save neilkod/2117936 to your computer and use it in GitHub Desktop.
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
# set -e | |
# if set -e was actually set, the first time the -f command | |
# returns non-zero, the entire program would exit with the return code | |
# from the ssh command. DO NOT WANT | |
while true | |
do | |
ssh [email protected] "[[ -f $src_dir/nz_${DOMAIN}_done.flag ]]" | |
retval=$? | |
if [[ $retval -ne 0 ]] | |
then | |
sleep $SLEEP_DURATION | |
echo "`date` waiting....on nz_${DOMAIN}_done.flag" | |
else | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment