Browse Source

fix: correct waiting loop

master
bucde 3 years ago
parent
commit
d2d52e170c
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      setup

+ 9
- 1
setup View File

@ -74,6 +74,14 @@ if [ $CONFIG_EXISTS == "false" ] || [ $USE_EXISTING_CONFIG == "n" ]; then
echo "Config file 'config' created!" echo "Config file 'config' created!"
else else
echo "Use existing config file 'config'!" echo "Use existing config file 'config'!"
while read line; do
if [[ $line == *"GITEA_HOST_IP_ADDRESS="* ]]; then
GITEA_HOST_IP_ADDRESS=$(echo $line | cut -c 23-)
else if [[ $line == *"GITEA_HOST_WEB_PORT="* ]]; then
GITEA_HOST_WEB_PORT=$(echo $line | cut -c 21-)
fi
done < "config"
fi fi
cat "config" >> ".env" cat "config" >> ".env"
@ -84,7 +92,7 @@ docker-compose up -d
echo -n "Wait until gitea is ready ..." echo -n "Wait until gitea is ready ..."
while ! curl -fILs $GITEA_HOST_IP_ADDRESS:$GITEA_HOST_WEB_PORT ; do
while [[ "$(curl -fLs -w ''%{http_code}'' $GITEA_HOST_IP_ADDRESS:$GITEA_HOST_WEB_PORT -o /dev/null)" != "200" ]] ; do
echo -n "." echo -n "."
sleep 1 sleep 1
done done


Loading…
Cancel
Save