25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

move spool dir to make it fully configurable per ejabberdctl.cfg (#3863)

In the packaged rpm the spool dir is set to:
```
: "${SPOOL_DIR:="/opt/ejabberd/database/$ERLANG_NODE"}"
```

However, `$ERLANG_NODE` is effectively set later (now in line 67), which effectively makes spool dir always in `...../ejabberd@localhost`
This commit is contained in:
duritong 2022-10-26 14:02:42 +02:00 committed by GitHub
parent 2ef71a6684
commit 122af79207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,6 @@ done
# define ejabberd variables if not already defined from the command line # define ejabberd variables if not already defined from the command line
: "${CONFIG_DIR:="{{config_dir}}"}" : "${CONFIG_DIR:="{{config_dir}}"}"
: "${LOGS_DIR:="{{logs_dir}}"}" : "${LOGS_DIR:="{{logs_dir}}"}"
: "${SPOOL_DIR:="{{spool_dir}}"}"
: "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}" : "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}"
: "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}" : "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}"
# Allows passing extra Erlang command-line arguments in vm.args file # Allows passing extra Erlang command-line arguments in vm.args file
@ -68,6 +67,7 @@ done
[ -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"
: "${SPOOL_DIR:="{{spool_dir}}"}"
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}" : "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
# define erl parameters # define erl parameters