Add script to run another once gitea is ready
This commit is contained in:
parent
426d7ada07
commit
343b3f5e62
1 changed files with 14 additions and 0 deletions
14
build-when-ready.sh
Normal file
14
build-when-ready.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
failcount=0
|
||||||
|
until curl -X "GET" 'https://gitea.jotoho.de/api/v1/version' >/dev/null 2>&1; do
|
||||||
|
if [ "$failcount" -gt 300 ]; then
|
||||||
|
echo "Gitea timeout. Exiting!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
failcount=$(($failcount + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
sh $1
|
Loading…
Reference in a new issue