From b69ecbc9b5a28283fb5966c995e48735ef98b20d Mon Sep 17 00:00:00 2001 From: dw-0 Date: Mon, 25 Dec 2023 19:56:43 +0100 Subject: [PATCH] fix(KIAUH): wrong logic in status detection Signed-off-by: Dominik Willner --- kiauh/utils/common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kiauh/utils/common.py b/kiauh/utils/common.py index 8cb20c8..13ab2c4 100644 --- a/kiauh/utils/common.py +++ b/kiauh/utils/common.py @@ -111,10 +111,12 @@ def get_install_status_webui( nginx_cfg_exist = check_file_exist(nginx_cfg) upstreams_cfg_exist = check_file_exist(upstreams_cfg) common_cfg_exist = check_file_exist(common_cfg) - status = [dir_exist, nginx_cfg_exist, upstreams_cfg_exist, common_cfg_exist] - if all(status): + status = [dir_exist, nginx_cfg_exist] + general_nginx_status = [upstreams_cfg_exist, common_cfg_exist] + + if all(status) and all(general_nginx_status): return f"{COLOR_GREEN}Installed!{RESET_FORMAT}" - elif not any(status): + elif not all(status): return f"{COLOR_RED}Not installed!{RESET_FORMAT}" else: return f"{COLOR_YELLOW}Incomplete!{RESET_FORMAT}"