--- ejabberdctl.template.orig 2022-10-30 09:41:25 UTC +++ ejabberdctl.template @@ -58,7 +58,7 @@ done # define ejabberd variables if not already defined from the command line : "${CONFIG_DIR:="{{config_dir}}"}" -: "${LOGS_DIR:="{{logs_dir}}"}" +: ${LOGS_DIR:=/var/log/ejabberd} : "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}" : "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}" # Allows passing extra Erlang command-line arguments in vm.args file @@ -67,7 +67,7 @@ done [ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH" [ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG" [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s" -: "${SPOOL_DIR:="{{spool_dir}}"}" +: ${SPOOL_DIR:=/var/spool/ejabberd} : "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}" # define erl parameters @@ -84,7 +84,8 @@ fi [ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -erl_epmd_port $ERL_DIST_PORT -start_epmd false" # 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}}/ejabberd +ERL_LIBS=$ERL_LIBS:{{libdir}}/ejabberd/lib ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump ERL_INETRC="$CONFIG_DIR"/inetrc