mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
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:
parent
76725a0068
commit
0d0ee32a87
@ -237,6 +237,8 @@ def subcommand_change_domainname(arguments):
|
|||||||
conf['hosts'].append(
|
conf['hosts'].append(
|
||||||
ruamel.yaml.scalarstring.DoubleQuotedScalarString(domainname))
|
ruamel.yaml.scalarstring.DoubleQuotedScalarString(domainname))
|
||||||
|
|
||||||
|
conf['hosts'] = list(set(conf['hosts']))
|
||||||
|
|
||||||
with open(EJABBERD_CONFIG, 'w') as file_handle:
|
with open(EJABBERD_CONFIG, 'w') as file_handle:
|
||||||
ruamel.yaml.round_trip_dump(conf, file_handle)
|
ruamel.yaml.round_trip_dump(conf, file_handle)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user