delete duplicate code

This commit is contained in:
Claudia Agache
2020-08-20 18:46:46 +03:00
parent 79aae0bfcc
commit 5b35b54ba0
3 changed files with 2 additions and 46 deletions

View File

@@ -12,13 +12,6 @@ if [ -n "${S3_BUCKET_NAME}" ] ; then
export S3_BUCKET_NAME="${S3_BUCKET_NAME,,}"
fi
export DOCKER_COMPOSE_PATH=$1
if [ -z "$DOCKER_COMPOSE_PATH" ] ; then
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
exit 1
fi
echo "Starting AGS stack in ${DOCKER_COMPOSE_PATH}"
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
@@ -30,28 +23,3 @@ else
echo "Docker Compose failed to start" >&2
exit 1
fi
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
echo "Wait onther 30 seconds..."
sleep 30