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
|
while true
|
||||||
do
|
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
|
then
|
||||||
if docker compose ps --services | grep teamspeak >/dev/null; then
|
if docker compose ps --services | grep teamspeak >/dev/null; then
|
||||||
echo "Stopping Server"
|
echo "Stopping Server"
|
||||||
|
@ -14,5 +14,5 @@ do
|
||||||
docker compose up -d --pull=always
|
docker compose up -d --pull=always
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
Reference in a new issue