diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-02-09 16:52:05 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-02-09 16:52:05 +0000 |
commit | f4c47ea3cf0264003194a03dafe3ab1c1bf9be9f (patch) | |
tree | 62a44a306a820a1d7cd35b0c5c1648a617a93c71 | |
parent | f3f1540b333309d4f2f74cb0a9520f7ff0d2d5da (diff) | |
download | rabbitmq-server-f4c47ea3cf0264003194a03dafe3ab1c1bf9be9f.tar.gz |
Undo 3b4956543c30
-rw-r--r-- | docs/rabbitmqctl.1.xml | 18 | ||||
-rw-r--r-- | packaging/common/rabbitmq-server.init | 4 | ||||
-rw-r--r-- | src/rabbit_control.erl | 14 |
3 files changed, 3 insertions, 33 deletions
diff --git a/docs/rabbitmqctl.1.xml b/docs/rabbitmqctl.1.xml index 2f2e8b41..5c090e5a 100644 --- a/docs/rabbitmqctl.1.xml +++ b/docs/rabbitmqctl.1.xml @@ -197,24 +197,6 @@ </listitem> </varlistentry> - <varlistentry> - <term><cmdsynopsis><command>init_status</command></cmdsynopsis></term> - <listitem> - <para> - Displays an init.d-style status line about whether the server - is running. - </para> - <para role="example-prefix">For example:</para> - <screen role="example">rabbitmqctl init_status</screen> - <para role="example"> - This command displays: - rabbit@hostname is running (pid 1234). - or - rabbit@hostname is NOT running. - </para> - </listitem> - </varlistentry> - <varlistentry id="reset"> <term><cmdsynopsis><command>reset</command></cmdsynopsis></term> <listitem> diff --git a/packaging/common/rabbitmq-server.init b/packaging/common/rabbitmq-server.init index e05cfc1b..ea21f098 100644 --- a/packaging/common/rabbitmq-server.init +++ b/packaging/common/rabbitmq-server.init @@ -79,9 +79,9 @@ stop_rabbitmq () { status_rabbitmq() { set +e if [ "$1" != "quiet" ] ; then - $CONTROL init_status 2>&1 + $CONTROL status 2>&1 else - $CONTROL init_status > /dev/null 2>&1 + $CONTROL status > /dev/null 2>&1 fi if [ $? != 0 ] ; then RETVAL=3 diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl index 3f7fdf92..a8903102 100644 --- a/src/rabbit_control.erl +++ b/src/rabbit_control.erl @@ -25,7 +25,6 @@ -define(QUIET_OPT, "-q"). -define(NODE_OPT, "-n"). -define(VHOST_OPT, "-p"). --define(INHERENTLY_QUIET, [init_status]). %%---------------------------------------------------------------------------- @@ -63,8 +62,7 @@ start() -> end end, Opts), Command = list_to_atom(Command0), - Quiet = proplists:get_bool(?QUIET_OPT, Opts1) - orelse lists:member(Command, ?INHERENTLY_QUIET), + Quiet = proplists:get_bool(?QUIET_OPT, Opts1), Node = proplists:get_value(?NODE_OPT, Opts1), Inform = case Quiet of true -> fun (_Format, _Args1) -> ok end; @@ -81,8 +79,6 @@ start() -> false -> io:format("...done.~n") end, quit(0); - fail_silent -> - quit(1); {'EXIT', {function_clause, [{?MODULE, action, _} | _]}} -> print_error("invalid command '~s'", [string:join([atom_to_list(Command) | Args], " ")]), @@ -177,14 +173,6 @@ action(status, Node, [], _Opts, Inform) -> ok end; -action(init_status, Node, [], Opts, _) -> - case call(Node, {os, getpid, []}) of - {badrpc, _} -> io:format("~p is NOT running.", [Node]), - fail_silent; - Res -> io:format("~p is running (pid ~s).", [Node, Res]), - ok - end; - action(rotate_logs, Node, [], _Opts, Inform) -> Inform("Reopening logs for node ~p", [Node]), call(Node, {rabbit, rotate_logs, [""]}); |