aboutsummaryrefslogtreecommitdiff
path: root/src/ext_mod.erl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-07-01 13:17:00 +0200
committerBadlop <badlop@process-one.net>2021-07-06 13:37:04 +0200
commitbb0c6e1e024a095a37db823372eb56bfd716a356 (patch)
tree27552fe85c67392821e424b260a92b3c56b8fdf4 /src/ext_mod.erl
parentMerge pull request #3566 from Robbilie/feature/mqtt-shared-roster-groups-plac... (diff)
Show messages with next configuration steps when installing a module
Diffstat (limited to 'src/ext_mod.erl')
-rw-r--r--src/ext_mod.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ext_mod.erl b/src/ext_mod.erl
index 9ff53ca8c..5353019bb 100644
--- a/src/ext_mod.erl
+++ b/src/ext_mod.erl
@@ -638,6 +638,7 @@ install(Module, Spec, SrcDir, LibDir) ->
Errors = lists:dropwhile(fun({_, ok}) -> true;
(_) -> false
end, Files1++Files2),
+ inform_module_configuration(Module, LibDir, Files1),
Result = case Errors of
[{F, {error, E}}|_] ->
{error, {F, E}};
@@ -649,6 +650,24 @@ install(Module, Spec, SrcDir, LibDir) ->
file:set_cwd(CurDir),
Result.
+inform_module_configuration(Module, LibDir, Files1) ->
+ Res = lists:filter(fun({[$c, $o, $n, $f |_], ok}) -> true;
+ (_) -> false
+ end, Files1),
+ case Res of
+ [{ConfigPath, ok}] ->
+ FullConfigPath = filename:join(LibDir, ConfigPath),
+ io:format("Module ~p has been installed and started.~n"
+ "It's configured in the file:~n ~s~n"
+ "Configure the module in that file, or remove it~n"
+ "and configure in your main ejabberd.yml~n",
+ [Module, FullConfigPath]);
+ [] ->
+ io:format("Module ~p has been installed.~n"
+ "Now you can configure it in your ejabberd.yml~n",
+ [Module])
+ end.
+
%% -- minimalist rebar spec parser, only support git
fetch_rebar_deps(SrcDir) ->