mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Merge pull request #3346 from processone/ejabberd-3343
Allow passing Erlang VM args through vm.args config file
This commit is contained in:
commit
b89b0f140a
@ -60,6 +60,8 @@ done
|
|||||||
: "${SPOOL_DIR:="{{localstatedir}}/lib/ejabberd"}"
|
: "${SPOOL_DIR:="{{localstatedir}}/lib/ejabberd"}"
|
||||||
: "${EJABBERD_CONFIG_PATH:="$ETC_DIR/ejabberd.yml"}"
|
: "${EJABBERD_CONFIG_PATH:="$ETC_DIR/ejabberd.yml"}"
|
||||||
: "${EJABBERDCTL_CONFIG_PATH:="$ETC_DIR/ejabberdctl.cfg"}"
|
: "${EJABBERDCTL_CONFIG_PATH:="$ETC_DIR/ejabberdctl.cfg"}"
|
||||||
|
# Allows passing extra Erlang command-line arguments in vm.args file
|
||||||
|
: "${VMARGS:="$ETC_DIR/vm.args"}"
|
||||||
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
|
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
|
||||||
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
|
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
|
||||||
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
|
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
|
||||||
@ -77,6 +79,8 @@ if [ -n "$INET_DIST_INTERFACE" ] ; then
|
|||||||
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
|
||||||
|
# if vm.args file exists in config directory, pass it to Erlang VM
|
||||||
|
[ -f "$VMARGS" ] && ERLANG_OPTS="$ERLANG_OPTS -args_file $VMARGS"
|
||||||
ERL_LIBS={{libdir}}
|
ERL_LIBS={{libdir}}
|
||||||
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
|
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
|
||||||
ERL_INETRC="$ETC_DIR"/inetrc
|
ERL_INETRC="$ETC_DIR"/inetrc
|
||||||
|
Loading…
Reference in New Issue
Block a user