#Place at the bottom of the AEM or CQ Start script.
Last active
August 29, 2015 14:14
-
-
Save toodooleedoo/bc1ed64491fbfc3499ad to your computer and use it in GitHub Desktop.
#AEM #CQ #LINUX Startup Script Enhancement
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
######################################################################## | |
# | |
# BWI Custom | |
# Wait for server to return successful validation | |
# | |
# Eric Soukenka - 03Nov2014 | |
# | |
######################################################################## | |
TIMELIMIT=$((SECONDS+120)) | |
echo "Waiting for server validation. Ctrl+C to skip."; | |
until $(curl --silent "http://localhost:4502/libs/granite/core/content/login.html" |grep "QUICKSTART_HOMEPAGE" >/dev/null); do | |
printf '.'; | |
sleep 2; | |
if [ $SECONDS -gt $TIMELIMIT ]; then | |
echo ""; | |
echo "Waited ${SECONDS} seconds however validation has failed. Exiting now."; | |
exit | |
fi | |
done | |
echo ""; | |
echo "Startup completed successfully in ${SECONDS} seconds"; | |
###END BWI CUSTOM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment