ejabberd: Ensure that hosts are not duplicated in configuration

This is non-essential as there seems to be no problem for ejabberd with
duplicated host names.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-08-11 18:40:04 -04:00
1 parent 76725a0068
commit 0d0ee32a87
1 file changed
+2
+2
View File
@@ -237,6 +237,8 @@ def subcommand_change_domainname(arguments):
conf['hosts'].append(
ruamel.yaml.scalarstring.DoubleQuotedScalarString(domainname))
conf['hosts'] = list(set(conf['hosts']))
with open(EJABBERD_CONFIG, 'w') as file_handle:
ruamel.yaml.round_trip_dump(conf, file_handle)