Add possibility to configure erlang cookie

pull/32/head
Christophe Romain 5 years ago
parent 276696e085
commit 60145df968

@ -72,6 +72,11 @@ done
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
: "${SPOOL_DIR:="$HOME_DIR/database/$ERLANG_NODE"}"
[ -n "$ERLANG_COOKIE" ] && {
echo "$ERLANG_COOKIE" > "$HOME"/.erlang.cookie
chmod 400 "$HOME"/.erlang.cookie
}
# define erl parameters
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS"
if [ -n "$FIREWALL_WINDOW" ] ; then
@ -109,17 +114,6 @@ export CONTRIB_MODULES_PATH
export CONTRIB_MODULES_CONF_DIR
export ERL_LIBS
# export dynamic library path
case $(uname -m) in
i[3456]86) cpu="x86" ;;
i86pc) cpu="x86" ;;
armv7*) cpu="armhf" ;;
*) cpu=$(uname -m | tr A-Z a-z) ;;
esac
os=$(uname -s | tr A-Z a-z)
export LD_FALLBACK_LIBRARY_PATH="$ROOT_DIR"/lib/${os}-${cpu}
export DYLD_FALLBACK_LIBRARY_PATH="$LD_FALLBACK_LIBRARY_PATH"
# run command either directly or via su $INSTALLUSER
exec_cmd()
{

@ -45,8 +45,7 @@
# it's possible to make Erlang use a defined range of port (instead of dynamic
# ports) for node communication.
#
# Default: 4370-4349
# Example: 4370-4399 is maximum range allowed by default on container
# Default: 4370-4379
#
#FIREWALL_WINDOW=
@ -111,9 +110,6 @@
# ejabberd is started from an init.d script options -noshell and -detached are
# added implicitly. See erl(1) for more info.
#
# It might be useful to add "-pa /usr/local/lib/ejabberd/ebin" if you
# want to add local modules in this path.
#
# Default: ""
#
#ERL_OPTIONS=""
@ -136,6 +132,19 @@
#
#ERLANG_NODE=ejabberd@$(hostname)
#.
#' ERLANG_COOKIE: Erlang cookie for inter-node communication
#
# When using ejabberd in cluster, you need all nodes to share
# the same erlang cookie. If not defined, a random value is used
# at node first start, which prevent clustering to work. Setting
# a defined cookie for all your nodes is needed to setup cluster.
#
# Default: ""
#
#ERLANG_COOKIE=""
#.
#.
#' EJABBERD_PID_PATH: ejabberd PID file
#

Loading…
Cancel
Save