Add timeout to nc in teamspeak-fallback
This commit is contained in:
parent
ca0e40d0dd
commit
d42865d3f3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Reference in a new issue