From 8dc2f371d5a5d5c187982d324b664196f6cd6d73 Mon Sep 17 00:00:00 2001 From: mike dupont Date: Sat, 14 Dec 2024 09:35:32 -0500 Subject: [PATCH] now lets add a sleep to wait for swarms --- api/install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/install.sh b/api/install.sh index 904da1ad..6e286180 100644 --- a/api/install.sh +++ b/api/install.sh @@ -153,3 +153,13 @@ systemctl start nginx journalctl -xeu swarms-uvicorn.service | tail -200 || echo oops systemctl status swarms-uvicorn.service || echo oops2 +# now after swarms is up, we restart nginx +HOST="localhost" +PORT=5474 +while ! nc -z $HOST $PORT; do + sleep 1 + echo -n "." +done +echo "Port $PORT is now open!" + +systemctl restart nginx