From 0d0ee32a879d354275686f128a0f9f501707f2f6 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 2 Aug 2019 12:23:53 -0700 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- actions/ejabberd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/actions/ejabberd b/actions/ejabberd index 57bdfecb9..aea8b312a 100755 --- a/actions/ejabberd +++ b/actions/ejabberd @@ -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)