25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-04 16:40:36 +01:00

Pre-load applications before setting the environment variables

This commit is contained in:
Evgeniy Khramtsov 2013-06-27 16:38:36 +10:00
parent 9094169440
commit 2ea397e476

View File

@ -28,6 +28,9 @@ init_config(Config) ->
CertFile = filename:join([DataDir, "cert.pem"]),
{ok, CWD} = file:get_cwd(),
{ok, _} = file:copy(CertFile, filename:join([CWD, "cert.pem"])),
ok = application:load(sasl),
ok = application:load(mnesia),
ok = application:load(ejabberd),
application:set_env(ejabberd, config, ConfigPath),
application:set_env(ejabberd, log_path, LogPath),
application:set_env(sasl, sasl_error_logger, {file, SASLPath}),