projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3235923
)
Import release config from env variable or /etc/pleroma/config.exs and
author
rinpatch
<rinpatch@sdf.org>
Tue, 11 Jun 2019 15:55:55 +0000
(18:55 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Tue, 11 Jun 2019 15:55:55 +0000
(18:55 +0300)
warn if the file is missing
config/releases.exs
patch
|
blob
|
history
diff --git
a/config/releases.exs
b/config/releases.exs
index becde76932f3561fd09d73464d43f1f7769ed87d..f8494dd345c47296a258463e02baaced86c3efbb 100644
(file)
--- a/
config/releases.exs
+++ b/
config/releases.exs
@@
-1
+1,16
@@
import Config
import Config
+
+config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
+
+if File.exists?(config_path) do
+ import_config config_path
+else
+ warning = [
+ IO.ANSI.red(),
+ IO.ANSI.bright(),
+ "!!! #{config_path} not found! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file",
+ IO.ANSI.reset()
+ ]
+
+ IO.puts(warning)
+end