Created
December 19, 2014 00:20
-
-
Save Gabelbombe/7a0d02758e573cb1e3db to your computer and use it in GitHub Desktop.
Wait for puppet certificate
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
| function certwait () | |
| { | |
| i=0 | |
| while sleep 1; do | |
| clear; echo "Ran ${i} loops" | |
| echo -e "\nFOUND:" | |
| matches=$(puppet cert list 2>/dev/null |awk '{print$1}' |sed -e 's/"//g' |grep "${1}") | |
| if [ ! -z "${matches}" ]; then | |
| echo $matches |sed -e 's/^//g' | |
| sleep | |
| fi | |
| ((i++)) | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment