summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorDaniil Fedotov <dfedotov@pivotal.io>2016-02-22 11:15:40 +0000
committerDaniil Fedotov <dfedotov@pivotal.io>2016-02-22 11:15:40 +0000
commitd937467ee05b0eef81f3ba2b4d420cbc3df98f50 (patch)
tree2e70c23c4f2f16943971942233289dad52d7c87f /src/rabbit.erl
parent173260d91e1f10ba0e5ef2cd16889ccd5bb28dab (diff)
downloadrabbitmq-server-git-d937467ee05b0eef81f3ba2b4d420cbc3df98f50.tar.gz
Config location logging
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 278ec0197d..9541f7c0b6 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -803,32 +803,7 @@ home_dir() ->
end.
config_files() ->
- Abs = fun (F) ->
- filename:absname(filename:rootname(F, ".config") ++ ".config")
- end,
- case init:get_argument(config) of
- {ok, Files} -> [Abs(File) || [File] <- Files];
- error -> case config_setting() of
- none -> [];
- File -> [Abs(File) ++ " (not found)"]
- end
- end.
-
-%% This is a pain. We want to know where the config file is. But we
-%% can't specify it on the command line if it is missing or the VM
-%% will fail to start, so we need to find it by some mechanism other
-%% than init:get_arguments/0. We can look at the environment variable
-%% which is responsible for setting it... but that doesn't work for a
-%% Windows service since the variable can change and the service not
-%% be reinstalled, so in that case we add a magic application env.
-config_setting() ->
- case application:get_env(rabbit, windows_service_config) of
- {ok, File1} -> File1;
- undefined -> case os:getenv("RABBITMQ_CONFIG_FILE") of
- false -> none;
- File2 -> File2
- end
- end.
+ rabbit_config:config_files().
%% We don't want this in fhc since it references rabbit stuff. And we can't put
%% this in the bootstep directly.