@@ -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
118117action (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