From 3d9dabd9147d2ba001d64de0ea5527bc5727dda6 Mon Sep 17 00:00:00 2001 From: norm Date: Wed, 6 Jul 2022 18:28:41 +0000 Subject: [PATCH] Fix config path lookup (#51) Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/51 Co-authored-by: norm Co-committed-by: norm --- lib/pleroma/config/release_runtime_provider.ex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/config/release_runtime_provider.ex b/lib/pleroma/config/release_runtime_provider.ex index e5e9d3dcd..1e4bddc59 100644 --- a/lib/pleroma/config/release_runtime_provider.ex +++ b/lib/pleroma/config/release_runtime_provider.ex @@ -12,7 +12,13 @@ defmodule Pleroma.Config.ReleaseRuntimeProvider do with_defaults = Config.Reader.merge(config, Pleroma.Config.Holder.release_defaults()) config_path = - opts[:config_path] || System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs" + cond do + opts[:config_path] -> opts[:config_path] + System.get_env("PLEROMA_CONFIG_PATH") -> System.get_env("PLEROMA_CONFIG_PATH") + System.get_env("AKKOMA_CONFIG_PATH") -> System.get_env("AKKOMA_CONFIG_PATH") + File.exists?("/etc/akkoma/config.exs") -> "/etc/akkoma/config.exs" + true -> "/etc/pleroma/config.exs" + end with_runtime_config = if File.exists?(config_path) do -- 2.45.2