diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/runtime.exs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/config/runtime.exs b/config/runtime.exs index ad8c6bdc..b4e6dc5f 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -1,18 +1,13 @@ 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/') +rootdefault = case System.get_env("RELIVE", "false") do + "true" -> "_build/relive" + "false" -> "" end + +rootpath = System.get_env("RELEASE_ROOT", rootdefault) +config :ejabberd, + file: Path.join(rootpath, "conf/ejabberd.yml"), + log_path: Path.join(rootpath, 'logs/ejabberd.log') +config :mnesia, + dir: Path.join(rootpath, 'database/') |