install_update_dovecot.sh: fix error in setting 'mail_temp_dir' (file 10-mail.conf).

This commit is contained in:
Christoph 2018-05-14 15:10:33 +02:00
parent 1a875c003e
commit 1a631532c4

View File

@ -1105,7 +1105,7 @@ perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_uid.*)#\1\#\# \2\n\1mail_uid = vmail#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_gid.*)#\1\#\# \2\n\1mail_gid = vmail#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_temp_dir.*)#\1\#\# \2\n\1mail_temp_dir = mail_temp_dir#g" \
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_temp_dir.*)#\1\#\# \2\n\1mail_temp_dir = /var/vmail/tmp#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
perl -i -n -p -e "s#^([ ]*)\#?\ ?(first_valid_uid.*)#\1\#\# \2\n\1first_valid_uid = 5000#g" \
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
@ -2078,24 +2078,24 @@ EOF
fi
# - At time, we don't use private tmp directory for divecot.
# -
echononl "\tAdjust Systemd service file, set PrivateTmp=false.."
if [[ -f "/etc/systemd/system/dovecot.service" ]] ; then
if $(grep -o -E "PrivateTmp\s*=\s*[^[:blank:]]+" /etc/systemd/system/dovecot.service | grep -q true 2> /dev/null ) ; then
perl -i -n -p -e "s/true/false/" /etc/systemd/system/dovecot.service
if [[ $? -eq 0 ]]; then
echo -e "$rc_done"
else
echo -e "$rc_failed"
fi
else
echo -e "$rc_skipped"
fi
else
echo -e "$rc_skipped"
fi
## - # - At time, we don't use private tmp directory for divecot.
## - # -
## - echononl "\tAdjust Systemd service file, set PrivateTmp=false.."
## - if [[ -f "/etc/systemd/system/dovecot.service" ]] ; then
## -
## - if $(grep -o -E "PrivateTmp\s*=\s*[^[:blank:]]+" /etc/systemd/system/dovecot.service | grep -q true 2> /dev/null ) ; then
## - perl -i -n -p -e "s/(PrivateTmp\s*=\s*)true/\1false/" /etc/systemd/system/dovecot.service
## - if [[ $? -eq 0 ]]; then
## - echo -e "$rc_done"
## - else
## - echo -e "$rc_failed"
## - fi
## - else
## - echo -e "$rc_skipped"
## - fi
## - else
## - echo -e "$rc_skipped"
## - fi
# - Reload systemd
# -