aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2013-06-18 19:35:55 +0200
committerBadlop <badlop@process-one.net>2013-06-18 19:35:55 +0200
commit79c51a059afc0a6c00d6ec4ae8c5c157c02858bb (patch)
tree3c7f0852147de127eed3dfb8d7041abfe257a703
parentAdded missing license and copyright headers. (diff)
Improve handling of INET_DIST_INTERFACE option (EJAB-1611)
In old releases, only the erlang format {127,0,0,1} was supported. Now we support also 127.0.0.1, but we want backwards compatibility.
-rwxr-xr-xejabberdctl.template6
1 files changed, 5 insertions, 1 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index 035918bee..252373c32 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -114,7 +114,11 @@ if [ "$FIREWALL_WINDOW" != "" ] ; then
KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
fi
if [ "$INET_DIST_INTERFACE" != "" ] ; then
- KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface \"{${INET_DIST_INTERFACE//./,}}\""
+ INET_DIST_INTERFACE2="$(echo $INET_DIST_INTERFACE | sed 's/\./,/g')"
+ if [ "$INET_DIST_INTERFACE" != "$INET_DIST_INTERFACE2" ] ; then
+ INET_DIST_INTERFACE2="{$INET_DIST_INTERFACE2}"
+ fi
+ KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
fi
if [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] ; then
NAME="-sname"