Skip to content

Commit 339f790

Browse files
committed
Place Mnesia in database/ and link to database/NODENAME for backwards compat
1 parent 3019cb0 commit 339f790

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ecs/bin/ejabberdctl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ done
6969
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
7070
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
7171
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
72-
: "${SPOOL_DIR:="$HOME_DIR/database/$ERLANG_NODE"}"
72+
: "${SPOOL_DIR:="$HOME_DIR/database"}"
7373

7474
[ -n "$ERLANG_COOKIE" ] && [ ! -f "$HOME"/.erlang.cookie ] && {
7575
echo "$ERLANG_COOKIE" > "$HOME"/.erlang.cookie
@@ -287,6 +287,8 @@ stop_epmd()
287287
# if all ok, ensure runtime directory exists and make it current directory
288288
check_start()
289289
{
290+
ECSIMAGE_DBPATH=$HOME/database/$ERLANG_NODE
291+
[ ! -d "$ECSIMAGE_DBPATH" ] && ln -s $HOME/database $HOME/database/$ERLANG_NODE
290292
[ -n "$ERL_DIST_PORT" ] && return
291293
"$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
292294
pgrep -f "$ERLANG_NODE" >/dev/null && {

0 commit comments

Comments
 (0)