install_update_dovecot.sh: in case of systemd service file set 'PrivateTmp=false'.

This commit is contained in:
Christoph 2018-05-13 22:15:38 +02:00
parent 1d0641e0cd
commit 81bc06e7fc

View File

@ -2078,6 +2078,25 @@ 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
# - Reload systemd
# -
echononl "\tReload systemd.."