create_sympa_listdomain.sh: some minor changes.
This commit is contained in:
parent
19c1db748f
commit
5fbb856136
@ -392,9 +392,6 @@ fi
|
|||||||
|
|
||||||
# - if multiple listmasers where given in a blank separated list, we correct it here
|
# - 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=()
|
declare -a listmaster_arr=()
|
||||||
for _listmaster in $SYMPA_LISTMASTER ; do
|
for _listmaster in $SYMPA_LISTMASTER ; do
|
||||||
listmaster_arr+=("$_listmaster")
|
listmaster_arr+=("$_listmaster")
|
||||||
@ -408,7 +405,11 @@ for _listmaster in "${listmaster_arr[@]}" ; do
|
|||||||
else
|
else
|
||||||
SYMPA_LISTMASTER="${SYMPA_LISTMASTER},$_listmaster"
|
SYMPA_LISTMASTER="${SYMPA_LISTMASTER},$_listmaster"
|
||||||
fi
|
fi
|
||||||
done
|
SYMPA_LISTMASTER="$(echo $SYMPA_LISTMASTER | sed 's/\(.\)\1*/\1/g')"
|
||||||
|
# Remove trailling ','
|
||||||
|
SYMPA_LISTMASTER="${SYMPA_LISTMASTER%,}"
|
||||||
|
# remove leading ','
|
||||||
|
SYMPA_LISTMASTER=${SYMPA_LISTMASTER#,}
|
||||||
|
|
||||||
|
|
||||||
if grep -e "^\s*listmaster" $SYMPA_MAIN_CONF_FILE > /dev/null 2>&1 ; then
|
if grep -e "^\s*listmaster" $SYMPA_MAIN_CONF_FILE > /dev/null 2>&1 ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user