mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Ensure EXIT_CODE is set. Kill Galaxy for local testing
Also properly initialise $i and use POSIX syntax
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
TRIES=120
|
||||
URL=http://localhost:8080
|
||||
EXIT_CODE=1
|
||||
i=0
|
||||
echo "Testing for correct startup:"
|
||||
bash run.sh --daemon && \
|
||||
while [[ $i -le $TRIES ]]
|
||||
do
|
||||
curl "$URL" && EXIT_CODE=0 && break
|
||||
sleep 1
|
||||
EXIT_CODE=1
|
||||
((i = i + 1))
|
||||
done
|
||||
while [ "$i" -le $TRIES ]; do
|
||||
curl "$URL" && EXIT_CODE=0 && break
|
||||
sleep 1
|
||||
i=$((i + 1))
|
||||
done
|
||||
kill -9 "$(cat paster.pid)"
|
||||
echo "exit code:$EXIT_CODE, showing startup log:"
|
||||
cat paster.log
|
||||
exit $EXIT_CODE
|
||||
|
||||
Reference in New Issue
Block a user