change if style (#3361)

This commit is contained in:
Casper 2023-05-24 09:06:59 +02:00 committed by GitHub
parent 0e592aa911
commit cf74127f78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 297 additions and 594 deletions

View file

@ -33,8 +33,7 @@ function _create_vhost
{
: >"${DATABASE_VHOST}"
if [[ -f ${TMP_VHOST} ]]
then
if [[ -f ${TMP_VHOST} ]]; then
sort < "${TMP_VHOST}" | uniq >>"${DATABASE_VHOST}"
rm "${TMP_VHOST}"
fi
@ -48,8 +47,7 @@ function _vhost_collect_postfix_domains
local DOMAIN UNAME
# getting domains FROM mail accounts
if [[ -f ${DATABASE_ACCOUNTS} ]]
then
if [[ -f ${DATABASE_ACCOUNTS} ]]; then
while IFS=$'|' read -r LOGIN _
do
DOMAIN=$(echo "${LOGIN}" | cut -d @ -f2)
@ -58,8 +56,7 @@ function _vhost_collect_postfix_domains
fi
# getting domains FROM mail aliases
if [[ -f ${DATABASE_VIRTUAL} ]]
then
if [[ -f ${DATABASE_VIRTUAL} ]]; then
while read -r FROM _
do
UNAME=$(echo "${FROM}" | cut -d @ -f1)