diff options
author | crupest <crupest@outlook.com> | 2022-11-19 18:17:59 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-19 18:17:59 +0800 |
commit | c20cacc48fde3da0cdb0fbd08184ae5637044c99 (patch) | |
tree | 820a1ed4cf01f8d2f14dfb37a5615306f6a60214 /tool/aio.py | |
parent | 8e9dd42976020d501c6fb02fc67a0f4e93a5c96b (diff) | |
download | crupest-c20cacc48fde3da0cdb0fbd08184ae5637044c99.tar.gz crupest-c20cacc48fde3da0cdb0fbd08184ae5637044c99.tar.bz2 crupest-c20cacc48fde3da0cdb0fbd08184ae5637044c99.zip |
Add fix for bad files in nginx config dir.
Diffstat (limited to 'tool/aio.py')
-rwxr-xr-x | tool/aio.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tool/aio.py b/tool/aio.py index 953f852..011387d 100755 --- a/tool/aio.py +++ b/tool/aio.py @@ -103,6 +103,17 @@ def download_tools(): def generate_nginx_config(domain: str) -> None: + bad_files = nginx_config_dir_check(nginx_config_dir, domain) + if len(bad_files) > 0: + console.print( + "WARNING: It seems there are some bad conf files in the nginx config directory:", style="yellow") + for bad_file in bad_files: + console.print(bad_file, style="cyan") + to_delete = Confirm.ask( + "They will affect nginx in a [red]bad[/] way. Do you want to delete them?", default=True, console=console) + if to_delete: + for file in bad_files: + os.remove(os.path.join(nginx_config_dir, file)) console.print( "I have found following var in nginx templates:", style="green") for var in nginx_var_set: |