Feng Lee пре 9 година
родитељ
комит
1f50175c6f
2 измењених фајлова са 0 додато и 16 уклоњено
  1. 0 1
      src/emqttd_app.erl
  2. 0 15
      src/emqttd_plugins.erl

+ 0 - 1
src/emqttd_app.erl

@@ -47,7 +47,6 @@ start(_StartType, _StartArgs) ->
     start_servers(Sup),
     emqttd_cli:load(),
     load_all_mods(),
-    emqttd_plugins:init(),
     emqttd_plugins:load(),
     start_listeners(),
     register(emqttd, self()),

+ 0 - 15
src/emqttd_plugins.erl

@@ -18,27 +18,12 @@
 
 -include("emqttd.hrl").
 
--export([init/0]).
-
 -export([load/0, unload/0]).
 
 -export([load/1, unload/1]).
 
 -export([list/0]).
 
-init() ->
-    case emqttd:env(plugins_etc_dir) of
-        {ok, PluginsEtc} ->
-            CfgFiles = filelib:wildcard("*.conf", PluginsEtc),
-            lists:foreach(fun(CfgFile) ->
-                App = app_name(CfgFile),
-                application:set_env(App, conf, filename:join(PluginsEtc, CfgFile)),
-                gen_conf:init(App)
-            end, CfgFiles);
-        undefined ->
-            ok
-    end.
-
 %% @doc Load all plugins when the broker started.
 -spec(load() -> list() | {error, any()}).
 load() ->