mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
If INET_DIST_INTERFACE is IPv6, set required option (thanks to Stu Tomlinson)(#4189)
This commit is contained in:
parent
7c76f2b764
commit
d6d8bce0e4
3
.github/container/ejabberdctl.template
vendored
3
.github/container/ejabberdctl.template
vendored
@ -79,6 +79,9 @@ fi
|
|||||||
if [ -n "$INET_DIST_INTERFACE" ] ; then
|
if [ -n "$INET_DIST_INTERFACE" ] ; then
|
||||||
INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
|
INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
|
||||||
if [ -n "$INET_DIST_INTERFACE2" ] ; then
|
if [ -n "$INET_DIST_INTERFACE2" ] ; then
|
||||||
|
if [ $(echo "$INET_DIST_INTERFACE2" | grep -o "," | wc -l) -eq 7 ] ; then
|
||||||
|
INET_DIST_INTERFACE2="$INET_DIST_INTERFACE2 -proto_dist inet6_tcp"
|
||||||
|
fi
|
||||||
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
|
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -78,6 +78,9 @@ fi
|
|||||||
if [ -n "$INET_DIST_INTERFACE" ] ; then
|
if [ -n "$INET_DIST_INTERFACE" ] ; then
|
||||||
INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
|
INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
|
||||||
if [ -n "$INET_DIST_INTERFACE2" ] ; then
|
if [ -n "$INET_DIST_INTERFACE2" ] ; then
|
||||||
|
if [ $(echo "$INET_DIST_INTERFACE2" | grep -o "," | wc -l) -eq 7 ] ; then
|
||||||
|
INET_DIST_INTERFACE2="$INET_DIST_INTERFACE2 -proto_dist inet6_tcp"
|
||||||
|
fi
|
||||||
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
|
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user