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

Transform ejabberd_commands on the start

This commit is contained in:
Evgeniy Khramtsov 2016-11-19 13:05:13 +03:00
parent 9aff7e52a8
commit de7a143a2c

View File

@ -277,6 +277,10 @@ get_commands_spec() ->
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
result_example = ok}].
init() ->
try mnesia:transform_table(ejabberd_commands, ignore,
record_info(fields, ejabberd_commands))
catch exit:{aborted, {no_exists, _}} -> ok
end,
mnesia:create_table(ejabberd_commands,
[{ram_copies, [node()]},
{local_content, true},