aboutsummaryrefslogtreecommitdiff
path: root/tool/aio.py
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-19 13:11:44 +0800
committercrupest <crupest@outlook.com>2022-11-19 13:11:44 +0800
commit4a46c85d736c280d786da3e9dc52587e6633fcfc (patch)
tree696bc1f88bbe1d91938c59f72c73a1d1d2d27753 /tool/aio.py
parentf775f4c76691fc61b2993d81d9f1b4690e76b141 (diff)
downloadcrupest-4a46c85d736c280d786da3e9dc52587e6633fcfc.tar.gz
crupest-4a46c85d736c280d786da3e9dc52587e6633fcfc.tar.bz2
crupest-4a46c85d736c280d786da3e9dc52587e6633fcfc.zip
Fuck py.
Diffstat (limited to 'tool/aio.py')
-rwxr-xr-xtool/aio.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/tool/aio.py b/tool/aio.py
index 23540bb..f7f7612 100755
--- a/tool/aio.py
+++ b/tool/aio.py
@@ -109,24 +109,24 @@ def generate_nginx_config(domain: str) -> None:
if args.action == 'domain':
domain = check_domain_is_defined()
- match args.domain_action:
- case 'list':
- domains = list_domains(domain)
- for domain in domains:
- console.print(domain)
- case 'certbot':
- console.print(
- "Here is some commands you can use to do certbot related work.")
- is_test = args.test
- if is_test:
- console.print(
- "Note you specified --test, so the commands are for test use.", style="yellow")
- console.print(
- f"To create certs for init:\n[code]{certbot_command_gen(domain, 'create', test=is_test)}[/]")
+ domain_action = args.domain_action
+ if domain_action == 'list':
+ domains = list_domains(domain)
+ for domain in domains:
+ console.print(domain)
+ elif domain_action == 'certbot':
+ console.print(
+ "Here is some commands you can use to do certbot related work.")
+ is_test = args.test
+ if is_test:
console.print(
- f"To renew certs previously created:\n[code]{certbot_command_gen(domain, 'renew', test=is_test)}[/]")
- case 'nginx':
- generate_nginx_config(domain)
+ "Note you specified --test, so the commands are for test use.", style="yellow")
+ console.print(
+ f"To create certs for init:\n[code]{certbot_command_gen(domain, 'create', test=is_test)}[/]")
+ console.print(
+ f"To renew certs previously created:\n[code]{certbot_command_gen(domain, 'renew', test=is_test)}[/]")
+ elif domain_action == 'nginx':
+ generate_nginx_config(domain)
exit(0)