Follow up, style enhancement
This commit is contained in:
Casper 2021-02-09 14:13:09 +01:00 committed by GitHub
commit f168e3bd71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -598,7 +598,7 @@ function _setup_dovecot
# to the configuration file Dovecot will actually find # to the configuration file Dovecot will actually find
if [[ ${ENABLE_MANAGESIEVE} -eq 1 ]] if [[ ${ENABLE_MANAGESIEVE} -eq 1 ]]
then then
_notify 'inf' "Sieve management enabled" _notify 'inf' 'Sieve management enabled'
mv /etc/dovecot/protocols.d/managesieved.protocol.disab /etc/dovecot/protocols.d/managesieved.protocol mv /etc/dovecot/protocols.d/managesieved.protocol.disab /etc/dovecot/protocols.d/managesieved.protocol
fi fi
@ -1007,7 +1007,7 @@ function _setup_saslauthd
if [[ ! -f /etc/saslauthd.conf ]] if [[ ! -f /etc/saslauthd.conf ]]
then then
_notify 'inf' "Creating /etc/saslauthd.conf" _notify 'inf' 'Creating /etc/saslauthd.conf'
cat > /etc/saslauthd.conf << EOF cat > /etc/saslauthd.conf << EOF
ldap_servers: ${SASLAUTHD_LDAP_PROTO}${SASLAUTHD_LDAP_SERVER} ldap_servers: ${SASLAUTHD_LDAP_PROTO}${SASLAUTHD_LDAP_SERVER}
@ -1086,7 +1086,7 @@ function _setup_postfix_aliases
/etc/postfix/main.cf /etc/postfix/main.cf
fi fi
_notify 'inf' "Configuring root alias" _notify 'inf' 'Configuring root alias'
echo "root: ${POSTMASTER_ADDRESS}" > /etc/aliases echo "root: ${POSTMASTER_ADDRESS}" > /etc/aliases
@ -1966,18 +1966,19 @@ function misc
done done
} }
# consolidate all states into a single directory
# (/var/mail-state) to allow persistence using docker volumes
function _misc_save_states function _misc_save_states
{ {
# consolidate all states into a single directory (`/var/mail-state`) local STATEDIR FILE FILES
# to allow persistence using docker volumes
local STATEDIR=/var/mail-state STATEDIR='/var/mail-state'
if [[ ${ONE_DIR} -eq 1 ]] && [[ -d ${STATEDIR} ]] if [[ ${ONE_DIR} -eq 1 ]] && [[ -d ${STATEDIR} ]]
then then
_notify 'inf' "Consolidating all state onto ${STATEDIR}" _notify 'inf' "Consolidating all state onto ${STATEDIR}"
local FILES=( FILES=(
spool/postfix spool/postfix
lib/postfix lib/postfix
lib/amavis lib/amavis
@ -1991,7 +1992,7 @@ function _misc_save_states
for FILE in "${FILES[@]}" for FILE in "${FILES[@]}"
do do
DEST="${STATEDIR}/${FILE//\//-}" DEST="${STATEDIR}/${FILE//\//-}"
local FILE="/var/${FILE}" FILE="/var/${FILE}"
if [[ -d ${DEST} ]] if [[ -d ${DEST} ]]
then then