From bf8b69ae682c5780dc1a59924dbbd7638aae4a8c Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 4 Dec 2023 14:16:09 +0100 Subject: [PATCH] put index.html into www/ dir, as it's not config --- deploy-chatmail/src/deploy_chatmail/__init__.py | 3 ++- .../src/deploy_chatmail/nginx => www/default}/index.html.j2 | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename {deploy-chatmail/src/deploy_chatmail/nginx => www/default}/index.html.j2 (100%) diff --git a/deploy-chatmail/src/deploy_chatmail/__init__.py b/deploy-chatmail/src/deploy_chatmail/__init__.py index 6f42794e..bbd25fb3 100644 --- a/deploy-chatmail/src/deploy_chatmail/__init__.py +++ b/deploy-chatmail/src/deploy_chatmail/__init__.py @@ -382,8 +382,9 @@ def deploy_chatmail(mail_domain: str, mail_server: str, dkim_selector: str) -> N if www_path.is_dir(): files.rsync(f"{www_path}/", "/var/www/html", flags=["-avz"]) else: + index_path = www_path.parent.joinpath("default/index.html.j2") files.template( - src=importlib.resources.files(__package__).joinpath("nginx/index.html.j2"), + src=index_path, dest="/var/www/html/index.html", user="root", group="root", diff --git a/deploy-chatmail/src/deploy_chatmail/nginx/index.html.j2 b/www/default/index.html.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/nginx/index.html.j2 rename to www/default/index.html.j2