def application do
[mod: {:ejabberd_app, []},
- applications: [:ssl, :os_mon, :lager, :mnesia, :inets, :p1_utils, :cache_tab,
- :fast_tls, :stringprep, :fast_xml, :xmpp,
- :stun, :fast_yaml, :esip, :jiffy, :p1_oauth2,
- :eimp, :base64url, :jose, :pkix]
+ applications: [:kernel, :stdlib, :sasl, :ssl],
+ included_applications: [:lager, :mnesia, :inets, :p1_utils, :cache_tab,
+ :fast_tls, :stringprep, :fast_xml, :xmpp,
+ :stun, :fast_yaml, :esip, :jiffy, :p1_oauth2,
+ :eimp, :base64url, :jose, :pkix]
++ cond_apps()]
end
{vsn, "@PACKAGE_VERSION@"},
{modules, []},
{registered, []},
- {applications, [kernel, stdlib, crypto, sasl, ssl, p1_utils, fast_yaml, fast_tls, pkix, xmpp, cache_tab, eimp]},
+ {applications, [kernel, stdlib, sasl, ssl]},
+ {included_applications, [lager, mnesia, inets, p1_utils, fast_yaml, fast_tls, pkix, xmpp, cache_tab, eimp]},
{env, [{enabled_backends, [@enabled_backends@]}]},
{mod, {ejabberd_app, []}}]}.
-include("logger.hrl").
start() ->
- %%ejabberd_cover:start(),
- ejabberd_logger:start(),
- ejabberd_mnesia:start(),
application:ensure_all_started(ejabberd).
stop() ->
application:stop(ejabberd).
- %%ejabberd_cover:stop().
halt() ->
application:stop(lager),
{T1, _} = statistics(wall_clock),
ejabberd_logger:start(),
write_pid_file(),
+ start_included_apps(),
start_elixir_application(),
ejabberd:check_app(ejabberd),
setup_if_elixir_conf_used(),
start(_, _) ->
{error, badarg}.
+start_included_apps() ->
+ {ok, Apps} = application:get_key(ejabberd, included_applications),
+ lists:foreach(
+ fun(mnesia) ->
+ ok;
+ (lager)->
+ ok;
+ (App) ->
+ application:ensure_all_started(App)
+ end, Apps).
+
%% Prepare the application for termination.
%% This function is called when an application is about to be stopped,
%% before shutting down the processes of the application.