Skip to content

Commit

Permalink
Check every second for container to start
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Nov 10, 2023
1 parent 5363124 commit 2aea60e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ if [ ! "$NO_TEST" = 'true' ]; then
if [ "$APPID" = 730 ]; then
CONTAINER_ID=$( docker run -itd --rm "$GAME_IMAGE" "$GAME_BIN -dedicated -port 27015 +map de_dust2" )
CONTAINER_IP=$( docker inspect "$CONTAINER_ID" -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' )
i=0; while [ "$i" -lt 10 ]; do
i=0; while [ "$i" -lt 30 ]; do
echo "Waiting for server to start"
docker logs "$CONTAINER_ID" | grep 'VAC secure mode is activated' && break || sleep 3
docker logs "$CONTAINER_ID" | grep 'VAC secure mode is activated' && break || sleep 1
i=$(($i + 1))
done
docker logs "$CONTAINER_ID"
Expand Down

0 comments on commit 2aea60e

Please sign in to comment.