diff options
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | docs/rabbitmq-plugins.1.xml (renamed from docs/rabbitmq-plugin.1.xml) | 18 | ||||
| -rwxr-xr-x | scripts/rabbitmq-plugins (renamed from scripts/rabbitmq-plugin) | 4 | ||||
| -rwxr-xr-x | scripts/rabbitmq-plugins.bat (renamed from scripts/rabbitmq-plugin.bat) | 2 | ||||
| -rw-r--r-- | src/rabbit_plugins.erl (renamed from src/rabbit_plugin.erl) | 10 |
5 files changed, 19 insertions, 19 deletions
@@ -18,7 +18,7 @@ TARGETS=$(EBIN_DIR)/rabbit.app $(INCLUDE_DIR)/rabbit_framing.hrl $(BEAM_TARGETS) WEB_URL=http://www.rabbitmq.com/ MANPAGES=$(patsubst %.xml, %.gz, $(wildcard $(DOCS_DIR)/*.[0-9].xml)) WEB_MANPAGES=$(patsubst %.xml, %.man.xml, $(wildcard $(DOCS_DIR)/*.[0-9].xml) $(DOCS_DIR)/rabbitmq-service.xml) -USAGES_XML=$(DOCS_DIR)/rabbitmqctl.1.xml $(DOCS_DIR)/rabbitmq-plugin.1.xml +USAGES_XML=$(DOCS_DIR)/rabbitmqctl.1.xml $(DOCS_DIR)/rabbitmq-plugins.1.xml USAGES_ERL=$(foreach XML, $(USAGES_XML), $(call usage_xml_to_erl, $(XML))) QC_MODULES := rabbit_backing_queue_qc QC_TRIALS ?= 100 @@ -302,7 +302,7 @@ install_bin: all install_dirs cp -r ebin include LICENSE LICENSE-MPL-RabbitMQ INSTALL $(TARGET_DIR) chmod 0755 scripts/* - for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugin; do \ + for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugins; do \ cp scripts/$$script $(TARGET_DIR)/sbin; \ [ -e $(SBIN_DIR)/$$script ] || ln -s $(SCRIPTS_REL_PATH)/$$script $(SBIN_DIR)/$$script; \ done diff --git a/docs/rabbitmq-plugin.1.xml b/docs/rabbitmq-plugins.1.xml index 9c214ae293..edc1ef9365 100644 --- a/docs/rabbitmq-plugin.1.xml +++ b/docs/rabbitmq-plugins.1.xml @@ -27,19 +27,19 @@ </refentryinfo> <refmeta> - <refentrytitle>rabbitmq-plugin</refentrytitle> + <refentrytitle>rabbitmq-plugins</refentrytitle> <manvolnum>1</manvolnum> <refmiscinfo class="manual">RabbitMQ Service</refmiscinfo> </refmeta> <refnamediv> - <refname>rabbitmq-plugin</refname> + <refname>rabbitmq-plugins</refname> <refpurpose>command line tool for managing a RabbitMQ broker plugins</refpurpose> </refnamediv> <refsynopsisdiv> <cmdsynopsis> - <command>rabbitmq-plugin</command> + <command>rabbitmq-plugins</command> <arg choice="req"><replaceable>command</replaceable></arg> <arg choice="opt" rep="repeat"><replaceable>command options</replaceable></arg> </cmdsynopsis> @@ -48,7 +48,7 @@ <refsect1> <title>Description</title> <para> - <command>rabbitmq-plugin</command> is a command line tool for + <command>rabbitmq-plugins</command> is a command line tool for managing RabbitMQ broker plugins. It allows one to enable, disable and browse plugins. Note that it must be run by a user with write permissions to the RabbitMQ configuration directory. @@ -81,15 +81,15 @@ name mathes <command>pattern</command> are shown. </para> <para role="example-prefix">For example:</para> - <screen role="example">rabbitmq-plugin list</screen> + <screen role="example">rabbitmq-plugins list</screen> <para role="example"> This command lists all the plugins available. </para> - <screen role="example">rabbitmq-plugin list -c</screen> + <screen role="example">rabbitmq-plugins list -c</screen> <para role="example"> This command lists all the plugins available, on one line each. </para> - <screen role="example">rabbitmq-plugin list -c management</screen> + <screen role="example">rabbitmq-plugins list -c management</screen> <para role="example"> This command lists all the plugins available, on one line each, but does not display plugins whose name does @@ -113,7 +113,7 @@ </para> <para role="example-prefix">For example:</para> - <screen role="example">rabbitmq-plugin enable rabbitmq_shovel rabbitmq_management</screen> + <screen role="example">rabbitmq-plugins enable rabbitmq_shovel rabbitmq_management</screen> <para role="example"> This command enables the <command>shovel</command> and <command>management</command> plugins and all their @@ -137,7 +137,7 @@ </para> <para role="example-prefix">For example:</para> - <screen role="example">rabbitmq-plugin disable amqp_client</screen> + <screen role="example">rabbitmq-plugins disable amqp_client</screen> <para role="example"> This command disables <command>amqp_client</command> and all plugins that depend on it. diff --git a/scripts/rabbitmq-plugin b/scripts/rabbitmq-plugins index d6cf2befa4..ca2d3caa8c 100755 --- a/scripts/rabbitmq-plugin +++ b/scripts/rabbitmq-plugins @@ -25,8 +25,8 @@ exec erl \ -pa "${RABBITMQ_HOME}/ebin" \ -noinput \ -hidden \ - -sname rabbitmq-plugin$$ \ - -s rabbit_plugin \ + -sname rabbitmq-plugins$$ \ + -s rabbit_plugins \ -plugins_dir "$RABBITMQ_PLUGINS_DIR" \ -plugins_dist_dir "$RABBITMQ_PLUGINS_DIST_DIR" \ -extra "$@" diff --git a/scripts/rabbitmq-plugin.bat b/scripts/rabbitmq-plugins.bat index d4fd96256d..8400d7e92d 100755 --- a/scripts/rabbitmq-plugin.bat +++ b/scripts/rabbitmq-plugins.bat @@ -38,7 +38,7 @@ if not exist "!ERLANG_HOME!\bin\erl.exe" ( set RABBITMQ_PLUGINS_DIR=!TDP0!..\plugins
set RABBITMQ_PLUGINS_DIST_DIR=!TDP0!..\plugins-dist
-"!ERLANG_HOME!\bin\erl.exe" -pa "!TDP0!..\ebin" -noinput -hidden -sname rabbitmq-plugin!RANDOM! -s rabbit_plugin -plugins_dir "!RABBITMQ_PLUGINS_DIR:\=/!" -plugins_dist_dir "!RABBITMQ_PLUGINS_DIST_DIR:\=/!" -extra !STAR!
+"!ERLANG_HOME!\bin\erl.exe" -pa "!TDP0!..\ebin" -noinput -hidden -sname rabbitmq-plugins!RANDOM! -s rabbit_plugins -plugins_dir "!RABBITMQ_PLUGINS_DIR:\=/!" -plugins_dist_dir "!RABBITMQ_PLUGINS_DIST_DIR:\=/!" -extra !STAR!
endlocal
endlocal
diff --git a/src/rabbit_plugin.erl b/src/rabbit_plugins.erl index 96715d9eda..570791d924 100644 --- a/src/rabbit_plugin.erl +++ b/src/rabbit_plugins.erl @@ -14,7 +14,7 @@ %% Copyright (c) 2011 VMware, Inc. All rights reserved. %% --module(rabbit_plugin). +-module(rabbit_plugins). -include("rabbit.hrl"). -export([start/0, stop/0]). @@ -71,7 +71,7 @@ print_error(Format, Args) -> rabbit_misc:format_stderr("Error: " ++ Format ++ "~n", Args). usage() -> - io:format("~s", [rabbit_plugin_usage:usage()]), + io:format("~s", [rabbit_plugins_usage:usage()]), rabbit_misc:quit(1). %%---------------------------------------------------------------------------- @@ -289,7 +289,7 @@ lookup_plugins(Names, AllPlugins) -> %% Read the enabled plugin names from disk. read_enabled_plugins(PluginsDir) -> FileName = enabled_plugins_filename(PluginsDir), - case rabbit_misc:read_term_file(FileName) of + case rabbit_file:read_term_file(FileName) of {ok, [Plugins]} -> Plugins; {error, enoent} -> []; {error, Reason} -> throw({error, {cannot_read_enabled_plugins_file, @@ -299,7 +299,7 @@ read_enabled_plugins(PluginsDir) -> %% Update the enabled plugin names on disk. update_enabled_plugins(PluginsDir, Plugins) -> FileName = enabled_plugins_filename(PluginsDir), - case rabbit_misc:write_term_file(FileName, [Plugins]) of + case rabbit_file:write_term_file(FileName, [Plugins]) of ok -> ok; {error, Reason} -> throw({error, {cannot_write_enabled_plugins_file, FileName, Reason}}) @@ -339,7 +339,7 @@ enable_one_plugin(#plugin{name = Name, version = Version, location = Path}, PluginsDir) -> io:format("Enabling ~w-~s~n", [Name, Version]), TargetPath = filename:join(PluginsDir, filename:basename(Path)), - ok = rabbit_misc:ensure_parent_dirs_exist(TargetPath), + ok = rabbit_file:ensure_parent_dirs_exist(TargetPath), case file:copy(Path, TargetPath) of {ok, _Bytes} -> ok; {error, Err} -> io:format("Error enabling ~p (~p)~n", |
