aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_app.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ejabberd_app.erl')
-rw-r--r--src/ejabberd_app.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ejabberd_app.erl b/src/ejabberd_app.erl
index 280535ca7..1641e0ad9 100644
--- a/src/ejabberd_app.erl
+++ b/src/ejabberd_app.erl
@@ -41,6 +41,7 @@ start(normal, _Args) ->
{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(),
@@ -72,6 +73,17 @@ start(normal, _Args) ->
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.