]> granicus.if.org Git - ejabberd/commitdiff
Move some apps back to included_applications
authorPaweł Chmielowski <pchmielowski@process-one.net>
Wed, 16 Jan 2019 14:01:32 +0000 (15:01 +0100)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Wed, 16 Jan 2019 14:01:32 +0000 (15:01 +0100)
mix.exs
src/ejabberd.app.src.in
src/ejabberd.erl
src/ejabberd_app.erl

diff --git a/mix.exs b/mix.exs
index fb90b24272a6a5a827729fa07e187c44ae746218..d7ef1707b480c43635c7cb60decbc365a39ae418 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -25,10 +25,11 @@ defmodule Ejabberd.Mixfile do
 
   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
 
index ea3a7894d80154c500fd5c1ac1ef23c4fdac7764..c3dc373067bef3b84de4c0fa0c568eaf1cc02761 100644 (file)
@@ -5,7 +5,8 @@
   {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, []}}]}.
 
index 5c632b36a9724613c49615ef27206257c47f5dd5..a7de9ab11187c9c50cf37bd79cb7dd4d7dc9897a 100644 (file)
 -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),
index 280535ca76fb191523b412886576531b114fe1b4..1641e0ad971ce154e7859ebc1c523f5ae645c898 100644 (file)
@@ -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.