From 45c7fbb5ae3760073691dd25745ba415283d920c Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 25 Apr 2022 12:46:48 +0200 Subject: Switch "make rel" and "make dev" to paths: conf, database, logs --- config/runtime.exs | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'config') 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/') -- cgit v1.2.3