mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Allow root to run join_cluster and leave_cluster
Prefix the call to joincluster and leavecluster in ejabberdctl by $EXEC_CMD. Avoid using sh -c in these scripts. Should fix #676.
This commit is contained in:
parent
3300c8d994
commit
c360326cdb
@ -444,11 +444,11 @@ check_start()
|
||||
# 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
|
||||
|
@ -145,7 +145,7 @@ start() ->
|
||||
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
|
||||
|
||||
|
@ -101,7 +101,7 @@ start() ->
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user