create_sympa_listdomain.sh: some minor changes for listmaster entries.

This commit is contained in:
Christoph 2021-02-19 14:57:15 +01:00
parent e4fe557332
commit 19c1db748f

View File

@ -390,6 +390,27 @@ else
done
fi
# - if multiple listmasers where given in a blank separated list, we correct it here
# -
echo ""
echo "SYMPA_LISTMASTER: $SYMPA_LISTMASTER"
echo ""
declare -a listmaster_arr=()
for _listmaster in $SYMPA_LISTMASTER ; do
listmaster_arr+=("$_listmaster")
done
SYMPA_LISTMASTER=""
_first=true
for _listmaster in "${listmaster_arr[@]}" ; do
if $_first ; then
SYMPA_LISTMASTER="$_listmaster"
_first=false
else
SYMPA_LISTMASTER="${SYMPA_LISTMASTER},$_listmaster"
fi
done
if grep -e "^\s*listmaster" $SYMPA_MAIN_CONF_FILE > /dev/null 2>&1 ; then
_BSP_POSTMASTER_ABUSE_ADDRESS=`grep -e "^\s*listmaster" $SYMPA_MAIN_CONF_FILE 2> /dev/null | awk '{print$2}'`
elif grep -e "^\s*#\s*listmaster" $SYMPA_MAIN_CONF_FILE > /dev/null 2>&1 ; then