26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

ejabberdctl: Reorganize commands related to mnesia info

- ejabberdctl mnesia: already implemented in ejabberd_admin.erl
- ejabberdctl mnesia info: renamed to mnesia_info_ctl
- ejabberdctl mnesia Arg: command removed, use mnesia_info_ctl instead
This commit is contained in:
Badlop 2024-01-31 16:54:02 +01:00
parent ea40afbe03
commit e9de3748bd

View File

@ -142,21 +142,10 @@ process(["status"], _Version) ->
%% TODO: Mnesia operations should not be hardcoded in ejabberd_ctl module.
%% For now, I leave them there to avoid breaking those commands for people that
%% may be using it (as format of response is going to change).
process(["mnesia"], _Version) ->
print("~p~n", [mnesia:system_info(all)]),
?STATUS_SUCCESS;
process(["mnesia", "info"], _Version) ->
process(["mnesia_info_ctl"], _Version) ->
mnesia:info(),
?STATUS_SUCCESS;
process(["mnesia", Arg], _Version) ->
case catch mnesia:system_info(list_to_atom(Arg)) of
{'EXIT', Error} -> print("Error: ~p~n", [Error]);
Return -> print("~p~n", [Return])
end,
?STATUS_SUCCESS;
process(["print_sql_schema", DBType, DBVersion, NewSchema], _Version) ->
ejabberd_sql_schema:print_schema(DBType, DBVersion, NewSchema);