summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2015-03-04 17:18:57 +0100
committerBadlop <badlop@process-one.net>2015-03-04 17:18:57 +0100
commite575f401cdf91b084a52b882d9a1710965c756d4 (patch)
tree0aba707573b861c38e4cc61069c4d4aaa53ddff6
parentMerge branch 'master' of github.com:processone/ejabberd (diff)
Accept configuration file with .yaml extension (#290)
-rw-r--r--ejabberdctl.cfg.example2
-rw-r--r--src/ejabberd_config.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/ejabberdctl.cfg.example b/ejabberdctl.cfg.example
index b582527e..7bccb418 100644
--- a/ejabberdctl.cfg.example
+++ b/ejabberdctl.cfg.example
@@ -152,7 +152,7 @@
#' EJABBERD_CONFIG_PATH: ejabberd configuration file
#
# Specify the full path to the ejabberd configuration file. If the file name has
-# a ".yml" extension, it is parsed as a YAML file; otherwise, Erlang syntax is
+# yml or yaml extension, it is parsed as a YAML file; otherwise, Erlang syntax is
# expected.
#
# Default: $ETC_DIR/ejabberd.yml
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl
index 54a63590..6fc6c9e3 100644
--- a/src/ejabberd_config.erl
+++ b/src/ejabberd_config.erl
@@ -185,7 +185,7 @@ get_plain_terms_file(File1, Opts) ->
consult(File) ->
case filename:extension(File) of
- ".yml" ->
+ Ex when (Ex == ".yml") or (Ex == ".yaml") ->
case p1_yaml:decode_from_file(File, [plain_as_atom]) of
{ok, []} ->
{ok, []};