aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-24 17:53:26 +0800
committercrupest <crupest@outlook.com>2022-11-24 17:53:26 +0800
commit13f1a921082584a28541f7dc77da2414e3b0cdf3 (patch)
tree55b27b6addace565fe4866136948538edc79eeca
parent8abde99c6d7b4d6af5a046f9812ea485fc225128 (diff)
downloadcrupest-13f1a921082584a28541f7dc77da2414e3b0cdf3.tar.gz
crupest-13f1a921082584a28541f7dc77da2414e3b0cdf3.tar.bz2
crupest-13f1a921082584a28541f7dc77da2414e3b0cdf3.zip
Fix aio bug.
-rwxr-xr-xtool/modules/nginx.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/modules/nginx.py b/tool/modules/nginx.py
index 3ec9fb8..7aee923 100755
--- a/tool/modules/nginx.py
+++ b/tool/modules/nginx.py
@@ -95,7 +95,7 @@ def certbot_command_gen(domain: str, action, /, test=False, no_docker=False, *,
certbot_action = "renew"
else:
raise ValueError('Invalid action')
-
+
if no_docker:
command = "certbot "
else:
@@ -124,7 +124,10 @@ def certbot_command_gen(domain: str, action, /, test=False, no_docker=False, *,
return command
+
def nginx_config_dir_check(dir_path: str, domain: str) -> list:
+ if not os.path.exists(dir_path):
+ return []
good_files = [*non_template_files, "ssl.conf", *
[f"{full_domain}.conf" for full_domain in list_domains(domain)]]
bad_files = []