Skip to content

Instantly share code, notes, and snippets.

@Gabelbombe
Created December 19, 2014 00:20
Show Gist options
  • Select an option

  • Save Gabelbombe/7a0d02758e573cb1e3db to your computer and use it in GitHub Desktop.

Select an option

Save Gabelbombe/7a0d02758e573cb1e3db to your computer and use it in GitHub Desktop.
Wait for puppet certificate
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