aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Oudinet <johan.oudinet@green-communications.fr>2015-04-27 17:25:07 +0200
committerJohan Oudinet <johan.oudinet@green-communications.fr>2015-04-27 17:25:07 +0200
commitbd4338541542c9803207a2523dba9d64f82670f7 (patch)
treef3e755118219dbf0b278551dbf4e72ad91c823b9
parentRely on core routine for handling affiliation changes (thanks to Ben Langfeld) (diff)
ejabberdctl: define mnesia options
In addition to factorize how the mnesia dir option is given to erl commands, it allows one to set extra mnesia options via the MNESIA_OPTIONS environment variable.
-rwxr-xr-xejabberdctl.template6
1 files changed, 4 insertions, 2 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index dca995e99..6c131ace0 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -112,6 +112,8 @@ DATETIME=`date "+%Y%m%d-%H%M%S"`
ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
ERL_INETRC=$ETC_DIR/inetrc
+# define mnesia options
+MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
# define erl parameters
ERL_OPTIONS=$(echo $ERL_OPTIONS | sed 's/ /\\ /g')
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS"
@@ -177,7 +179,7 @@ start()
$NAME $ERLANG_NODE \
-noinput -detached \
-pa $EJABBERD_EBIN_PATH \
- -mnesia dir \"\\\"$SPOOL_DIR\\\"\" \
+ $MNESIA_OPTS \
$KERNEL_OPTS \
$EJABBERD_OPTS \
-s ejabberd \
@@ -218,7 +220,7 @@ live()
$EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \
-pa $EJABBERD_EBIN_PATH \
- -mnesia dir \"\\\"$SPOOL_DIR\\\"\" \
+ $MNESIA_OPTS \
$KERNEL_OPTS \
$EJABBERD_OPTS \
-s ejabberd \