diff options
Diffstat (limited to 'src/ejabberd_config.erl')
-rw-r--r-- | src/ejabberd_config.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index 2642e2ad0..a2822a388 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -34,9 +34,17 @@ start() -> {local_content, true}, {attributes, record_info(fields, local_config)}]), mnesia:add_table_copy(local_config, node(), ram_copies), + + %% mremond: Config file can be configured from the command line Config = case application:get_env(config) of {ok, Path} -> Path; - undefined -> ?CONFIG_PATH + undefined -> + case os:getenv("EJABBERD_CONFIG_PATH") of + false -> + ?CONFIG_PATH; + Path -> + Path + end end, load_file(Config). |