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 | f64304e2ba9eed47b364b267f53efb102a4907b5 (patch) | |
tree | bca3f19b557d9b9120d8f482fe20b511aa21f0e0 /tool/aio.py | |
parent | 77d0d76287d51df6178cf0b70656ced0b62df6ef (diff) | |
download | crupest-f64304e2ba9eed47b364b267f53efb102a4907b5.tar.gz crupest-f64304e2ba9eed47b364b267f53efb102a4907b5.tar.bz2 crupest-f64304e2ba9eed47b364b267f53efb102a4907b5.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")) |