diff --git a/roles/teamspeak_fallback/templates/conditional-start.sh.j2 b/roles/teamspeak_fallback/templates/conditional-start.sh.j2 index f0ac6a6..e06184a 100644 --- a/roles/teamspeak_fallback/templates/conditional-start.sh.j2 +++ b/roles/teamspeak_fallback/templates/conditional-start.sh.j2 @@ -2,7 +2,7 @@ while true do - if nc -z "{{ teamspeak_fallback_check_server }}" "{{ teamspeak_fallback_check_port }}" + if nc -z -w 3 "{{ teamspeak_fallback_check_server }}" "{{ teamspeak_fallback_check_port }}" then if docker compose ps --services | grep teamspeak >/dev/null; then echo "Stopping Server" @@ -14,5 +14,5 @@ do docker compose up -d --pull=always fi fi - sleep 5 + sleep 2 done