diff options
author | crupest <crupest@outlook.com> | 2022-11-27 11:43:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-27 11:43:19 +0800 |
commit | 39b8d121b4867c667194369f17946be8ebb06e8b (patch) | |
tree | bca3f19b557d9b9120d8f482fe20b511aa21f0e0 /tool/aio.py | |
parent | 3be4d089dca831ec5e79eb457100a967b8a20398 (diff) | |
download | crupest-39b8d121b4867c667194369f17946be8ebb06e8b.tar.gz crupest-39b8d121b4867c667194369f17946be8ebb06e8b.tar.bz2 crupest-39b8d121b4867c667194369f17946be8ebb06e8b.zip |
Add basic function for checking ssl certs.
Diffstat (limited to 'tool/aio.py')
-rwxr-xr-x | tool/aio.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tool/aio.py b/tool/aio.py index 4327e95..9d14e5f 100755 --- a/tool/aio.py +++ b/tool/aio.py @@ -3,6 +3,7 @@ try: import rich import jsonschema + import cryptography except ImportError: print("Some necessary modules can't be imported. Please run `pip install -r requirements.txt` to install them.") exit(1) @@ -512,6 +513,12 @@ if os.path.isdir(data_dir): "Looks like you haven't run certbot to get the init ssl certificates. You may want to run following code to get one:", style="cyan") console.print(certbot_command_gen(domain, "create"), soft_wrap=True, highlight=False) + else: + to_check = Confirm.ask( + "I want to check your ssl certs, but I need to sudo. Do you want me check", console=console, default=False) + if to_check: + get_cert_path(check_domain_is_defined()) + # TODO: Do the check! if not os.path.exists(os.path.join(data_dir, "code-server")): os.mkdir(os.path.join(data_dir, "code-server")) |