turn.yml aktualisiert
This commit is contained in:
parent
76c13c884f
commit
49fa20fb2a
11
turn.yml
11
turn.yml
@ -41,6 +41,10 @@
|
|||||||
tls-listening-port=5349
|
tls-listening-port=5349
|
||||||
cert=/etc/coturn/cert.pem
|
cert=/etc/coturn/cert.pem
|
||||||
pkey=/etc/coturn/key.pem
|
pkey=/etc/coturn/key.pem
|
||||||
|
no-sslv3
|
||||||
|
no-tlsv1
|
||||||
|
no-tlsv1_1
|
||||||
|
no-tlsv1_2
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: Restart turn
|
notify: Restart turn
|
||||||
|
|
||||||
@ -97,14 +101,15 @@
|
|||||||
. /etc/bash/gaboshlib.include
|
. /etc/bash/gaboshlib.include
|
||||||
cd /home/docker/turn.{{inventory_hostname}}/coturn
|
cd /home/docker/turn.{{inventory_hostname}}/coturn
|
||||||
|
|
||||||
local_ip=$(ip route get 1 | grep " src " | head -n1 | cut -d" " -f7)
|
#local_ip=$(ip route get 1 | grep " src " | head -n1 | cut -d" " -f7)
|
||||||
g_valid_ipv4 "$local_ip" || g_echo_error_exit "Invalid local_ip $local_ip"
|
#g_valid_ipv4 "$local_ip" || g_echo_error_exit "Invalid local_ip $local_ip"
|
||||||
external_ip=$(curl -s https://checkipv4.dedyn.io)
|
external_ip=$(curl -s https://checkipv4.dedyn.io)
|
||||||
g_valid_ipv4 "$local_ip" || g_echo_error_exit "Invalid external_ip $external_ip"
|
g_valid_ipv4 "$local_ip" || g_echo_error_exit "Invalid external_ip $external_ip"
|
||||||
if ! grep -q "external-ip=$local_ip/$external_ip" turnserver.conf
|
if ! grep -q "external-ip=$local_ip/$external_ip" turnserver.conf
|
||||||
then
|
then
|
||||||
sed -i '/^external-ip=.*/d' turnserver.conf
|
sed -i '/^external-ip=.*/d' turnserver.conf
|
||||||
echo "external-ip=$local_ip/$external_ip" >>turnserver.conf
|
#echo "external-ip=$local_ip/$external_ip" >>turnserver.conf
|
||||||
|
echo "external-ip=$external_ip" >>turnserver.conf
|
||||||
fi
|
fi
|
||||||
[ -f /home/docker/turn.{{inventory_hostname}}/docker-compose.yml ] && \
|
[ -f /home/docker/turn.{{inventory_hostname}}/docker-compose.yml ] && \
|
||||||
docker compose -f /home/docker/turn.{{inventory_hostname}}/docker-compose.yml restart
|
docker compose -f /home/docker/turn.{{inventory_hostname}}/docker-compose.yml restart
|
||||||
|
Loading…
x
Reference in New Issue
Block a user