updated scripts because I can't use general scripts to start/stop alfresco from different subdirectories

This commit is contained in:
cagache
2018-06-29 11:09:15 +03:00
parent c8bafd9b0b
commit c94fe3f74e
2 changed files with 0 additions and 15 deletions

View File

@@ -0,0 +1,23 @@
#!/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