install_update_dovecot.sh: adjust 'PIDFile' at file 'dovecot.service'
This commit is contained in:
parent
a831ea065f
commit
f97f38fa38
@ -2308,6 +2308,22 @@ EOF
|
||||
else
|
||||
echo -e "$rc_skipped"
|
||||
fi
|
||||
|
||||
echononl "Adjust 'PIDFile' at file 'dovecot.service'.."
|
||||
if [[ -f "/etc/systemd/system/dovecot.service" ]] ; then
|
||||
if $(grep -q -o -E "^\s*PIDFile\s*=\s*/var/run/" /etc/systemd/system/dovecot.service 2> /dev/null ) ; then
|
||||
perl -i -n -p -e "s/^(PIDFile\s*=\/var(\/run\/.+))/#\1\nPIDFile=\2/" /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
|
||||
fi
|
||||
|
||||
## - Add a cronjob to restart dovecot after booting the system.
|
||||
|
Loading…
Reference in New Issue
Block a user