Prefix the call to joincluster and leavecluster in ejabberdctl by
$EXEC_CMD. Avoid using sh -c in these scripts.
Should fix #676.
# cluster setup
join_cluster()
{
- $EJABBERD_BIN_PATH/joincluster $*
+ $EXEC_CMD "$EJABBERD_BIN_PATH/joincluster $*"
}
leave_cluster()
{
- $EJABBERD_BIN_PATH/leavecluster $*
+ $EXEC_CMD "$EJABBERD_BIN_PATH/leavecluster $*"
}
# allow sync calls
EOF
$ERLC -o $PA $CLUSTERSETUP_ERL
-sh -c "$ERL $NAME $ERLANG_NODE -pa $PA $KERNEL_OPTS -mnesia extra_db_nodes \"['$REMOTE']\" dir \"\\\"$SPOOL_DIR\\\"\" -s mnesia -s $CLUSTERSETUP start"
+$ERL $NAME $ERLANG_NODE -pa $PA $KERNEL_OPTS -mnesia extra_db_nodes "['$REMOTE']" dir "\"$SPOOL_DIR\"" -s mnesia -s $CLUSTERSETUP start
cd -
rm -Rf $PA
EOF
$ERLC -o $PA $CLUSTERSETUP_ERL
-sh -c "$ERL $NAME $ERLANG_NODE -pa $PA $KERNEL_OPTS -mnesia dir \"\\\"$SPOOL_DIR\\\"\" -s mnesia -s $CLUSTERSETUP start"
+$ERL $NAME $ERLANG_NODE -pa $PA $KERNEL_OPTS -mnesia dir "\"$SPOOL_DIR\"" -s mnesia -s $CLUSTERSETUP start
cd -
rm -Rf $PA