From 344e799a517d43900b889be23f128b4ec74924df Mon Sep 17 00:00:00 2001 From: missytake Date: Fri, 13 Oct 2023 17:57:43 +0200 Subject: [PATCH] move doveauth scripts to its own python project --- chatmail-pyinfra/src/chatmail/__init__.py | 6 +++--- .../src/chatmail/dovecot => doveauth}/doveauth.lua | 0 .../src/chatmail/dovecot => doveauth}/doveauth.py | 0 .../src/chatmail/dovecot => doveauth}/test_doveauth.lua | 0 .../src/chatmail/dovecot => doveauth}/test_doveauth.py | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename {chatmail-pyinfra/src/chatmail/dovecot => doveauth}/doveauth.lua (100%) rename {chatmail-pyinfra/src/chatmail/dovecot => doveauth}/doveauth.py (100%) rename {chatmail-pyinfra/src/chatmail/dovecot => doveauth}/test_doveauth.lua (100%) rename {chatmail-pyinfra/src/chatmail/dovecot => doveauth}/test_doveauth.py (100%) diff --git a/chatmail-pyinfra/src/chatmail/__init__.py b/chatmail-pyinfra/src/chatmail/__init__.py index 83700c6b..6e733c8b 100644 --- a/chatmail-pyinfra/src/chatmail/__init__.py +++ b/chatmail-pyinfra/src/chatmail/__init__.py @@ -12,8 +12,8 @@ from .acmetool import deploy_acmetool def _install_chatctl() -> None: """Setup chatctl.""" files.put( - src=importlib.resources.files(__package__) - .joinpath("dovecot/doveauth.py") + src=importlib.resources.files("doveauth") + .joinpath("doveauth.py") .open("rb"), dest="/home/vmail/chatctl", user="vmail", @@ -103,7 +103,7 @@ def _configure_dovecot(mail_server: str) -> bool: # luarocks install http lpeg_patterns fifo auth_script = files.put( - src=importlib.resources.files(__package__).joinpath("dovecot/doveauth.lua"), + src=importlib.resources.files("doveauth").joinpath("doveauth.lua"), dest="/etc/dovecot/doveauth.lua", user="root", group="root", diff --git a/chatmail-pyinfra/src/chatmail/dovecot/doveauth.lua b/doveauth/doveauth.lua similarity index 100% rename from chatmail-pyinfra/src/chatmail/dovecot/doveauth.lua rename to doveauth/doveauth.lua diff --git a/chatmail-pyinfra/src/chatmail/dovecot/doveauth.py b/doveauth/doveauth.py similarity index 100% rename from chatmail-pyinfra/src/chatmail/dovecot/doveauth.py rename to doveauth/doveauth.py diff --git a/chatmail-pyinfra/src/chatmail/dovecot/test_doveauth.lua b/doveauth/test_doveauth.lua similarity index 100% rename from chatmail-pyinfra/src/chatmail/dovecot/test_doveauth.lua rename to doveauth/test_doveauth.lua diff --git a/chatmail-pyinfra/src/chatmail/dovecot/test_doveauth.py b/doveauth/test_doveauth.py similarity index 100% rename from chatmail-pyinfra/src/chatmail/dovecot/test_doveauth.py rename to doveauth/test_doveauth.py