Created
July 3, 2018 18:41
-
-
Save mttjohnson/192b827c3f1b8f9dfdd3ffc259a01300 to your computer and use it in GitHub Desktop.
David's waitforssh shell script
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/sh | |
| ssh $1 | |
| while test $? -gt 0 | |
| do | |
| sleep 5 # highly recommended - if it's in your local network, it can try an awful lot pretty quick... | |
| echo "Trying again..." | |
| ssh $1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment