mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
refactor: Move doveauth out of ChatmailVenvDeployer
- Revised DovecotDeployer to use _configure_remote_units() and _activate_remote_units() to deploy doveauth. This keeps the Dovecot-related services in a single deployer class, leaving only services that are part of the chatmail project in ChatmailVenvDeployer. - Removed doveauth from the unit list in ChatmailVenvDeployer.
This commit is contained in:
@@ -564,6 +564,7 @@ class DovecotDeployer(Deployer):
|
|||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.config = config
|
self.config = config
|
||||||
self.disable_mail = disable_mail
|
self.disable_mail = disable_mail
|
||||||
|
self.units = ["doveauth"]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def install_impl():
|
def install_impl():
|
||||||
@@ -574,9 +575,12 @@ class DovecotDeployer(Deployer):
|
|||||||
_install_dovecot_package("lmtpd", arch)
|
_install_dovecot_package("lmtpd", arch)
|
||||||
|
|
||||||
def configure_impl(self):
|
def configure_impl(self):
|
||||||
|
_configure_remote_units(self.config.mail_domain, self.units)
|
||||||
self.need_restart = _configure_dovecot(self.config)
|
self.need_restart = _configure_dovecot(self.config)
|
||||||
|
|
||||||
def activate_impl(self):
|
def activate_impl(self):
|
||||||
|
_activate_remote_units(self.units)
|
||||||
|
|
||||||
restart = False if self.disable_mail else self.need_restart
|
restart = False if self.disable_mail else self.need_restart
|
||||||
|
|
||||||
systemd.service(
|
systemd.service(
|
||||||
@@ -978,7 +982,6 @@ class ChatmailVenvDeployer(Deployer):
|
|||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.config = config
|
self.config = config
|
||||||
self.units = (
|
self.units = (
|
||||||
"doveauth",
|
|
||||||
"filtermail",
|
"filtermail",
|
||||||
"filtermail-incoming",
|
"filtermail-incoming",
|
||||||
"chatmail-metadata",
|
"chatmail-metadata",
|
||||||
|
|||||||
Reference in New Issue
Block a user