24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00
xmpp.chapril.org-ejabberd/config/runtime.exs
Badlop adbccbe852 New "make relive" similar to "ejabberdctl live" without installing
Prepare with:
  ./autogen.sh && ./configure --with-rebar=./rebar3 && make
Or use this if you installed Elixir:
  ./autogen.sh && ./configure --with-rebar=mix && make
Start without installing (it recompiles when necessary):
  make relive
It stores config, database and logs in _build/relive/
There's available the well-known script:
  _build/relive/ejabberdctl

Please note this fails immediately:
  r3:do(compile).
This crashes a few seconds later:
  rebar3:run(["compile"]).
Workaround that works correctly:
  ejabberd_admin:update().
2022-02-03 18:21:47 +01:00

19 lines
621 B
Elixir

import Config
case System.get_env("RELIVE", "false") do
"true" ->
rootpath = System.get_env("RELEASE_ROOT", "_build/relive")
config :ejabberd,
file: Path.join(rootpath, "conf/ejabberd.yml"),
log_path: Path.join(rootpath, 'logs/ejabberd.log')
config :mnesia,
dir: Path.join(rootpath, 'database/')
"false" ->
rootpath = System.get_env("RELEASE_ROOT", "")
config :ejabberd,
file: Path.join(rootpath, "etc/ejabberd/ejabberd.yml"),
log_path: Path.join(rootpath, 'var/log/ejabberd/ejabberd.log')
config :mnesia,
dir: Path.join(rootpath, 'var/lib/ejabberd/')
end