From a7eb5a77eb3ecaa53f57b29289426a470d7d5db3 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 6 Jul 2009 14:08:57 +0000 Subject: [PATCH] Add -hidden flag when calling Debug or Ctl SVN Revision: 2354 --- doc/guide.tex | 4 ++++ src/ejabberdctl.template | 2 ++ tools/ejabberdctl | 2 ++ 3 files changed, 8 insertions(+) diff --git a/doc/guide.tex b/doc/guide.tex index 96861581d..80bc03277 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -4192,6 +4192,10 @@ The command line parameters: Maximum number of Erlang processes. \titem{-remsh ejabberd@localhost} Open an Erlang shell in a remote Erlang node. + \titem{-hidden} + The connections to other nodes are hidden (not published). + The result is that this node is not considered part of the cluster. + This is important when starting a temporary \term{ctl} or \term{debug} node. \end{description} Note that some characters need to be escaped when used in shell scripts, for instance \verb|"| and \verb|{}|. You can find other options in the Erlang manual page (\shell{erl -man erl}). diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template index 5ed63b70e..71634d87f 100644 --- a/src/ejabberdctl.template +++ b/src/ejabberdctl.template @@ -164,6 +164,7 @@ debug () $EXEC_CMD "$ERL \ $NAME ${NODE}debug \ -remsh $ERLANG_NODE \ + -hidden \ $ERLANG_OPTS $ARGS \"$@\"" } @@ -218,6 +219,7 @@ ctl () $EXEC_CMD "$ERL \ $NAME ejabberdctl \ -noinput \ + -hidden \ -pa $EJABBERD_EBIN_PATH \ -s ejabberd_ctl -extra $ERLANG_NODE $COMMAND" result=$? diff --git a/tools/ejabberdctl b/tools/ejabberdctl index c821e8081..f084059a4 100755 --- a/tools/ejabberdctl +++ b/tools/ejabberdctl @@ -39,6 +39,7 @@ function debug -sname debug$NODE@$HOST \ -pa $EJABBERD_EBIN \ -mnesia dir "\"$EJABBERD_DB\"" \ + -hidden \ -remsh $NODE@$HOST } @@ -48,6 +49,7 @@ function ctl -noinput \ -sname ejabberdctl@$HOST \ -pa $EJABBERD_EBIN \ + -hidden \ -s ejabberd_ctl -extra $NODE@$HOST $@ }