From d379feea4fe32b9b81ff3efee1b2e177a91daf64 Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 8 Jul 2025 15:56:29 +0200 Subject: [PATCH] dovecot: only install if it isn't installed already --- cmdeploy/src/cmdeploy/__init__.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 814914ec..e35260ba 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -709,15 +709,10 @@ def deploy_chatmail(config_path: Path, disable_mail: bool) -> None: packages="postfix", ) - _install_dovecot_package("core", host.get_fact(facts.server.Arch)) - systemd.service( - name="Disable dovecot for now", - service="dovecot", - enabled=False, - running=False, - ) - _install_dovecot_package("imapd", host.get_fact(facts.server.Arch)) - _install_dovecot_package("lmtpd", host.get_fact(facts.server.Arch)) + if not "dovecot.service" in host.get_fact(SystemdEnabled): + _install_dovecot_package("core", host.get_fact(facts.server.Arch)) + _install_dovecot_package("imapd", host.get_fact(facts.server.Arch)) + _install_dovecot_package("lmtpd", host.get_fact(facts.server.Arch)) apt.packages( name="Install nginx",