diff options
author | Emile Joubert <emile@rabbitmq.com> | 2011-11-30 10:39:28 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2011-11-30 10:39:28 +0000 |
commit | 3ab91d66007a31038b17cd78076bc1e070da1ce1 (patch) | |
tree | 8093b0a134e503f7908429859896c19b7d0c4dc1 | |
parent | 47bfea28f07fd3742ec51076d89a187183e61b48 (diff) | |
download | rabbitmq-server-bug24595.tar.gz |
Advice for windows service users when changing pluginsbug24595
-rw-r--r-- | docs/rabbitmq-service.xml | 3 | ||||
-rw-r--r-- | src/rabbit_plugins.erl | 20 |
2 files changed, 18 insertions, 5 deletions
diff --git a/docs/rabbitmq-service.xml b/docs/rabbitmq-service.xml index 3368960b..a4bd1580 100644 --- a/docs/rabbitmq-service.xml +++ b/docs/rabbitmq-service.xml @@ -66,7 +66,8 @@ Display usage information. <para> Install the service. The service will not be started. Subsequent invocations will update the service parameters if -relevant environment variables were modified. +relevant environment variables were modified or if the active +plugins were changed. </para> </listitem> </varlistentry> diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 0862f1b2..62c004f7 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -111,8 +111,7 @@ action(enable, ToEnable0, _Opts, PluginsFile, PluginsDir) -> [] -> io:format("Plugin configuration unchanged.~n"); _ -> print_list("The following plugins have been enabled:", NewImplicitlyEnabled -- ImplicitlyEnabled), - io:format("Plugin configuration has changed. " - "Restart RabbitMQ for changes to take effect.~n") + report_change() end; action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) -> @@ -140,8 +139,7 @@ action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) -> print_list("The following plugins have been disabled:", ImplicitlyEnabled -- NewImplicitlyEnabled), write_enabled_plugins(PluginsFile, NewEnabled), - io:format("Plugin configuration has changed. " - "Restart RabbitMQ for changes to take effect.~n") + report_change() end. %%---------------------------------------------------------------------------- @@ -374,3 +372,17 @@ maybe_warn_mochiweb(Enabled) -> false -> ok end. + +report_change() -> + io:format("Plugin configuration has changed. " + "Restart RabbitMQ for changes to take effect.~n"), + case os:type() of + {win32, _OsName} -> + io:format("If you have RabbitMQ running as a service then you must" + " reinstall by running~n rabbitmq-service.bat stop~n" + " rabbitmq-service.bat install~n" + " rabbitmq-service.bat start~n~n"); + _ -> + ok + end. + |