Skip to content

Commit 1380327

Browse files
author
Emile Joubert
committed
Advice for windows service users when changing plugins
1 parent 28938a3 commit 1380327

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

docs/rabbitmq-service.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ Display usage information.
6666
<para>
6767
Install the service. The service will not be started.
6868
Subsequent invocations will update the service parameters if
69-
relevant environment variables were modified.
69+
relevant environment variables were modified or if the active
70+
plugins were changed.
7071
</para>
7172
</listitem>
7273
</varlistentry>

src/rabbit_plugins.erl

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ action(enable, ToEnable0, _Opts, PluginsFile, PluginsDir) ->
111111
[] -> io:format("Plugin configuration unchanged.~n");
112112
_ -> print_list("The following plugins have been enabled:",
113113
NewImplicitlyEnabled -- ImplicitlyEnabled),
114-
io:format("Plugin configuration has changed. "
115-
"Restart RabbitMQ for changes to take effect.~n")
114+
report_change()
116115
end;
117116

118117
action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) ->
@@ -140,8 +139,7 @@ action(disable, ToDisable0, _Opts, PluginsFile, PluginsDir) ->
140139
print_list("The following plugins have been disabled:",
141140
ImplicitlyEnabled -- NewImplicitlyEnabled),
142141
write_enabled_plugins(PluginsFile, NewEnabled),
143-
io:format("Plugin configuration has changed. "
144-
"Restart RabbitMQ for changes to take effect.~n")
142+
report_change()
145143
end.
146144

147145
%%----------------------------------------------------------------------------
@@ -374,3 +372,17 @@ maybe_warn_mochiweb(Enabled) ->
374372
false ->
375373
ok
376374
end.
375+
376+
report_change() ->
377+
io:format("Plugin configuration has changed. "
378+
"Restart RabbitMQ for changes to take effect.~n"),
379+
case os:type() of
380+
{win32, _OsName} ->
381+
io:format("If you have RabbitMQ running as a service then you must"
382+
" reinstall by running~n rabbitmq-service.bat stop~n"
383+
" rabbitmq-service.bat install~n"
384+
" rabbitmq-service.bat start~n~n");
385+
_ ->
386+
ok
387+
end.
388+

0 commit comments

Comments
 (0)