1
0
Fork 0

Add script to run another once gitea is ready

This commit is contained in:
Jonas Tobias Hopusch 2021-12-05 16:57:55 +01:00
parent 426d7ada07
commit 343b3f5e62
Failed to generate hash of commit

14
build-when-ready.sh Normal file
View 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