Skip to content

Commit f379d4b

Browse files
committed
Add backward support for old mnesia spool dir path that included nodename
1 parent a1665f6 commit f379d4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ecs/bin/ejabberdctl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ done
6868
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
6969
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
7070
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
71-
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
7271
: "${SPOOL_DIR:="$HOME_DIR/database"}"
72+
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
73+
74+
# backward support for old mnesia spool dir path
75+
: "${SPOOL_DIR_OLD:="$SPOOL_DIR/$ERLANG_NODE"}"
76+
[ -r "$SPOOL_DIR_OLD/schema.DAT" ] && [ ! -r "$SPOOL_DIR/schema.DAT" ] && SPOOL_DIR="$SPOOL_DIR_OLD"
7377

7478
[ -n "$ERLANG_COOKIE" ] && [ ! -f "$HOME"/.erlang.cookie ] && {
7579
echo "$ERLANG_COOKIE" > "$HOME"/.erlang.cookie

0 commit comments

Comments
 (0)