dovecot: Fix service start error

1.Fix following dovecot.service starting error.
  dovecot[364]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 48: cert_file: open(/etc/dovecot/ssl-cert.pem) failed: No such file or directory
  systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
  systemd[1]: dovecot.service: Failed with result 'exit-code'.

2. There is no need to do "touch ${D}/etc/dovecot/dovecot.conf" as it was created by dovecot after dovecot was upgraded to 2.4.1-4.

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Liu Yiding
2025-10-31 13:37:37 +08:00
committed by Khem Raj
parent dab28c7ddd
commit e6c0f055d7

View File

@@ -54,8 +54,11 @@ SYSTEMD_AUTO_ENABLE = "disable"
do_install:append () {
rm -rf ${D}${libdir}/dovecot/dovecot-config
install -d 755 ${D}/etc/dovecot
touch ${D}/etc/dovecot/dovecot.conf
chmod 644 ${D}/etc/dovecot/dovecot.conf
touch ${D}/etc/dovecot/ssl-key.pem
touch ${D}/etc/dovecot/ssl-cert.pem
chmod 600 ${D}/etc/dovecot/ssl-key.pem
chmod 600 ${D}/etc/dovecot/ssl-cert.pem
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
install -m 0644 ${UNPACKDIR}/dovecot.service ${D}${systemd_unitdir}/system
sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/dovecot.service