]> granicus.if.org Git - ejabberd/commitdiff
Accept configuration file with .yaml extension (#290)
authorBadlop <badlop@process-one.net>
Wed, 4 Mar 2015 16:18:57 +0000 (17:18 +0100)
committerBadlop <badlop@process-one.net>
Wed, 4 Mar 2015 16:18:57 +0000 (17:18 +0100)
ejabberdctl.cfg.example
src/ejabberd_config.erl

index b582527ebb021c911568ac3e4a898c7c5b6373a5..7bccb41837ae854629177aa7e4f06e202a6ec2f3 100644 (file)
 #' 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
index 54a63590580e90548538a7ca10eb07adb4c3f847..6fc6c9e34b1416cadcb37e61a6724121a9e25e01 100644 (file)
@@ -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, []};