Path 1 (/MongooseIM/_build/prod/rel/mongooseim/etc/mongooseim.cfg
) is the actual config file of MongooseIM once it's built. You can tell that by MongooseIM/_build
in the path - the _build
directory doesn't exist in a fresh clone of the repository. To give you more context, /MongooseIM/_build/prod/rel/mongooseim
is a self-contained Erlang release of MongooseIM. Change this file if you want to modify the config of this particular MongooseIM build - the changes will be lost after you rebuild.
Path 2 (/MoongoosIM/rel/files/mongooseim.cfg
) is cloned as part of the repository - it's a config template. The specific values are defined in rel/*vars.config
files and are substituted for the variables in the template file at build time depending on the Rebar3 profile in use (see rebar.config
for profiles). Change this file if you want your changes to remain after consecutive rebuilds of the project.
To cut the long story short, when you run make rel
the files /MoongoosIM/rel/files/mongooseim.cfg
and /MoongoosIM/rel/vars.config
are used to create /MongooseIM/_build/prod/rel/mongooseim/etc/mongooseim.cfg
.