From 0980919eaa04b6f9c5f2dc93155840d862a57480 Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Fri, 7 Feb 2025 18:44:23 +0000 Subject: [PATCH] Implement get_services_status in cli_api & Remove get_webpanel_services_status --- core/cli_api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/cli_api.py b/core/cli_api.py index 095daae..07185a3 100644 --- a/core/cli_api.py +++ b/core/cli_api.py @@ -43,6 +43,7 @@ class Command(Enum): UNINSTALL_WARP = os.path.join(SCRIPT_DIR, 'warp', 'uninstall.sh') CONFIGURE_WARP = os.path.join(SCRIPT_DIR, 'warp', 'configure.sh') STATUS_WARP = os.path.join(SCRIPT_DIR, 'warp', 'status.sh') + SERVICES_STATUS = os.path.join(SCRIPT_DIR, 'services_status.sh') # region Custom Exceptions @@ -463,9 +464,9 @@ def get_webpanel_api_token() -> str | None: return run_cmd(['bash', Command.SHELL_WEBPANEL.value, 'api-token']) -def get_webpanel_services_status() -> dict[str, bool] | None: - '''Gets the status of WebPanel services.''' - if res := run_cmd(['bash', Command.SHELL_WEBPANEL.value, 'status']): +def get_services_status() -> dict[str, bool] | None: + '''Gets the status of all project services.''' + if res := run_cmd(['bash', Command.SERVICES_STATUS.value]): return json.loads(res) # endregion # endregion