Get back description and simplify processing (#3507)

This commit is contained in:
Badlop 2021-03-02 18:50:48 +01:00
parent b139eb2fb3
commit bf1600891b
2 changed files with 7 additions and 15 deletions

View File

@ -1,22 +1,16 @@
%% $Id$
Vars = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of Vars = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of
{ok, Terms} -> {ok, Terms} ->
Terms; [lists:keyfind(description, 1, Terms),
lists:keyfind(vsn, 1, Terms),
{env, [lists:keyfind(enabled_backends, 1, Terms)]}
];
_Err -> _Err ->
[] []
end, end,
Env = case lists:keyfind(enabled_backends, 1, Vars) of
false ->
{env, []};
Backends ->
{env, [Backends]}
end,
{application, ejabberd, {application, ejabberd,
[{description, "ejabberd"}, Vars ++
lists:keyfind(vsn, 1, Vars), [{modules, []},
{modules, []},
{registered, []}, {registered, []},
{applications, [kernel, stdlib, sasl, ssl]}, {applications, [kernel, stdlib, sasl, ssl]},
{included_applications, {included_applications,
@ -31,10 +25,8 @@ Env = case lists:keyfind(enabled_backends, 1, Vars) of
xmpp, xmpp,
cache_tab, cache_tab,
eimp]}, eimp]},
Env,
{mod, {ejabberd_app, []}}]}. {mod, {ejabberd_app, []}}]}.
%% Local Variables: %% Local Variables:
%% mode: erlang %% mode: erlang
%% End: %% End:

View File

@ -45,7 +45,7 @@
{vsn, "@PACKAGE_VERSION@"}. {vsn, "@PACKAGE_VERSION@"}.
%% Variables for overlay template files %% Variables for overlay template files
{package_name, "@PACKAGE_NAME@"}. {description, "@PACKAGE_NAME@"}.
{enabled_backends, [@enabled_backends@]}. {enabled_backends, [@enabled_backends@]}.
%% Platform-specific installation paths %% Platform-specific installation paths