From 81bc06e7fc31bf60f7b8a952afab90b58385ceb4 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 13 May 2018 22:15:38 +0200 Subject: [PATCH] install_update_dovecot.sh: in case of systemd service file set 'PrivateTmp=false'. --- install_update_dovecot.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/install_update_dovecot.sh b/install_update_dovecot.sh index 3d86449..112166f 100755 --- a/install_update_dovecot.sh +++ b/install_update_dovecot.sh @@ -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.."