X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fconfig%2Frelease_runtime_provider.ex;h=e5f2d6339676bb21cbbe6becc9f4322e66a0b087;hb=80f444fb52985939e2a11d9f48fbb5efc5361529;hp=e5e9d3dcd2c2a1019d990e76bfdaa9abb154e589;hpb=79376b4afb8bba0766cb3d04179aeaf4c0b7000b;p=akkoma diff --git a/lib/pleroma/config/release_runtime_provider.ex b/lib/pleroma/config/release_runtime_provider.ex index e5e9d3dcd..e5f2d6339 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("AKKOMA_CONFIG_PATH") -> System.get_env("AKKOMA_CONFIG_PATH") + System.get_env("PLEROMA_CONFIG_PATH") -> System.get_env("PLEROMA_CONFIG_PATH") + File.exists?("/etc/pleroma/config.exs") -> "/etc/pleroma/config.exs" + true -> "/etc/akkoma/config.exs" + end with_runtime_config = if File.exists?(config_path) do @@ -25,7 +31,7 @@ defmodule Pleroma.Config.ReleaseRuntimeProvider do warning = [ IO.ANSI.red(), IO.ANSI.bright(), - "!!! Config path is not declared! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file", + "!!! Config path is not declared! Please ensure it exists and that AKKOMA_CONFIG_PATH and/or PLEROMA_CONFIG_PATH is unset or points to an existing file", IO.ANSI.reset() ]