🔨」 fix(scripts): removed useless sleep and replace them with wait

This commit is contained in:
2025-12-17 16:15:04 +01:00
parent c240b1cc75
commit 36e42e275b
3 changed files with 39 additions and 16 deletions

View File

@ -4,16 +4,16 @@ S_ADDR="192.168.56.110"
SW_ADDR="192.168.56.111"
# In setup-SW.sh, before the k3s install command
# echo "Checking connectivity to server"
# I=0
# while ! curl -k https://$S_ADDR:6443/healthz > /dev/null 2>&1; do
# echo "Server API not reachable yet, waiting..."
# sleep 5
# I=$((I+1))
# if [ $I -eq 5 ]; then
# exit 1
# fi
# done
echo "Checking connectivity to server"
I=0
while ! curl -k https://$S_ADDR:6443/readyz > /dev/null 2>&1; do
echo "Server API not reachable yet, waiting..."
sleep 5
I=$((I+1))
if [ $I -eq 5 ]; then
exit 1
fi
done
echo "Server is reachable, proceeding with k3s agent install"
echo "Waiting for token"