Files
alfresco-community-repo/scripts/waitForAlfrescoToStart.sh
Tom Page e00b4997e9 RM-6428 Handle multiple source images and multiple destinations.
Also update the scripts to be executable.
2018-07-27 09:58:39 +01:00

23 lines
543 B
Bash
Executable File

#!/usr/bin/env bash
WAIT_INTERVAL=1
COUNTER=0
TIMEOUT=300
t0=`date +%s`
echo "Waiting for alfresco to start"
until $(curl --output /dev/null --silent --head --fail http://localhost:8080/alfresco) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
printf '.'
sleep $WAIT_INTERVAL
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
done
if (("$COUNTER" < "$TIMEOUT")) ; then
t1=`date +%s`
delta=$((($t1 - $t0)/60))
echo "Alfresco Started in $delta minutes"
else
echo "Waited $COUNTER seconds"
echo "Alfresco Could not start in time."
exit 1
fi