mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
talk: automatically bind ipv4 only if ipv6 is disabled
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
d1b37c1216
commit
895f4b82e3
1 changed files with 9 additions and 2 deletions
|
|
@ -30,14 +30,21 @@ if [ -n "$IPv4_ADDRESS_TALK" ] && [ "$IPv4_ADDRESS_TALK_RELAY" = "$IPv4_ADDRESS_
|
|||
IPv4_ADDRESS_TALK=""
|
||||
fi
|
||||
|
||||
IP_BINDING="::"
|
||||
if grep -q "1" /sys/module/ipv6/parameters/disable \
|
||||
|| sysctl -a 2>/dev/null | grep "net.ipv6.conf.all.disable_ipv6" | grep -q "1" \
|
||||
|| sysctl -a 2>/dev/null | grep "net.ipv6.conf.default.disable_ipv6" | grep -q "1"; then
|
||||
IP_BINDING="0.0.0.0"
|
||||
fi
|
||||
|
||||
# Turn
|
||||
cat << TURN_CONF > "/conf/eturnal.yml"
|
||||
eturnal:
|
||||
listen:
|
||||
- ip: "::"
|
||||
- ip: "$IP_BINDING"
|
||||
port: $TALK_PORT
|
||||
transport: udp
|
||||
- ip: "::"
|
||||
- ip: "$IP_BINDING"
|
||||
port: $TALK_PORT
|
||||
transport: tcp
|
||||
log_dir: stdout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue