fix issue #257
This commit is contained in:
parent
4698d040fd
commit
20384de0ef
|
@ -20,6 +20,7 @@ RUNNER_BASE_DIR={{runner_base_dir}}
|
||||||
RUNNER_ETC_DIR={{runner_etc_dir}}
|
RUNNER_ETC_DIR={{runner_etc_dir}}
|
||||||
RUNNER_LIB_DIR={{platform_lib_dir}}
|
RUNNER_LIB_DIR={{platform_lib_dir}}
|
||||||
RUNNER_LOG_DIR={{runner_log_dir}}
|
RUNNER_LOG_DIR={{runner_log_dir}}
|
||||||
|
RUNNER_DATA_DIR=$RUNNER_BASE_DIR/data
|
||||||
RUNNER_PLUGINS_DIR=$RUNNER_BASE_DIR/plugins
|
RUNNER_PLUGINS_DIR=$RUNNER_BASE_DIR/plugins
|
||||||
|
|
||||||
# Note the trailing slash on $PIPE_DIR/
|
# Note the trailing slash on $PIPE_DIR/
|
||||||
|
@ -72,6 +73,8 @@ if [ -z "$NAME_ARG" ]; then
|
||||||
echo "vm.args needs to have either -name or -sname parameter."
|
echo "vm.args needs to have either -name or -sname parameter."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
NAME_ARR=(${NAME_ARG// / })
|
||||||
|
NODE_NAME=${NAME_ARR[1]}
|
||||||
|
|
||||||
# Extract the target cookie
|
# Extract the target cookie
|
||||||
COOKIE_ARG=`grep '^\-setcookie' $RUNNER_ETC_DIR/vm.args`
|
COOKIE_ARG=`grep '^\-setcookie' $RUNNER_ETC_DIR/vm.args`
|
||||||
|
@ -264,9 +267,12 @@ case "$1" in
|
||||||
BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin
|
BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin
|
||||||
EMU=beam
|
EMU=beam
|
||||||
PROGNAME=`echo $0 | sed 's/.*\///'`
|
PROGNAME=`echo $0 | sed 's/.*\///'`
|
||||||
|
# Setup Mnesia Dir
|
||||||
|
MNESIA_DIR="$RUNNER_DATA_DIR/mnesia/$NODE_NAME"
|
||||||
CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$SCRIPT \
|
CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$SCRIPT \
|
||||||
-embedded -config $RUNNER_ETC_DIR/emqttd.config \
|
-embedded -config $RUNNER_ETC_DIR/emqttd.config \
|
||||||
-pa $RUNNER_LIB_DIR/basho-patches \
|
-pa $RUNNER_LIB_DIR/basho-patches \
|
||||||
|
-mnesia dir "\"${MNESIA_DIR}\"" \
|
||||||
-args_file $RUNNER_ETC_DIR/vm.args -- ${1+"$@"}"
|
-args_file $RUNNER_ETC_DIR/vm.args -- ${1+"$@"}"
|
||||||
export EMU
|
export EMU
|
||||||
export ROOTDIR
|
export ROOTDIR
|
||||||
|
|
|
@ -6,11 +6,6 @@
|
||||||
## Cookie for distributed erlang
|
## Cookie for distributed erlang
|
||||||
-setcookie emqttdsecretcookie
|
-setcookie emqttdsecretcookie
|
||||||
|
|
||||||
##-------------------------------------------------------------------------
|
|
||||||
## Mnesia dir. NOTICE: quote the dir with '" "'
|
|
||||||
##-------------------------------------------------------------------------
|
|
||||||
-mnesia dir '"data/mnesia"'
|
|
||||||
|
|
||||||
##-------------------------------------------------------------------------
|
##-------------------------------------------------------------------------
|
||||||
## Flags
|
## Flags
|
||||||
##-------------------------------------------------------------------------
|
##-------------------------------------------------------------------------
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
{mkdir, "etc/"},
|
{mkdir, "etc/"},
|
||||||
{mkdir, "etc/ssl/"},
|
{mkdir, "etc/ssl/"},
|
||||||
{mkdir, "data/"},
|
{mkdir, "data/"},
|
||||||
|
{mkdir, "data/mnesia"},
|
||||||
{mkdir, "plugins/"},
|
{mkdir, "plugins/"},
|
||||||
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
|
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
|
||||||
{template, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
|
{template, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
|
||||||
|
|
Loading…
Reference in New Issue