Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-04-25 13:46:48 +0300
committerBadlop <badlop@process-one.net>2022-05-02 14:17:53 +0300
commit45c7fbb5ae3760073691dd25745ba415283d920c (patch)
tree1c87b385a7a55a371b963dbad30561d498d5c314 /config
parenta852c31c6c9d4a9d9fe730d701dffcc0fadf08cd (diff)
Switch "make rel" and "make dev" to paths: conf, database, logs
Diffstat (limited to 'config')
-rw-r--r--config/runtime.exs25
1 files changed, 10 insertions, 15 deletions
diff --git a/config/runtime.exs b/config/runtime.exs
index ad8c6bdc9..b4e6dc5f1 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/')