From 71d555538ac002adecf29413c826fbe374a151f4 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:12:17 +0330 Subject: [PATCH] Added WARP status --- core/cli.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/cli.py b/core/cli.py index bbf3775..2b6312a 100644 --- a/core/cli.py +++ b/core/cli.py @@ -41,6 +41,7 @@ class Command(Enum): INSTALL_WARP = os.path.join(SCRIPT_DIR, 'warp', 'install.sh') 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') # region utils @@ -320,6 +321,12 @@ def configure_warp(all: bool, popular_sites: bool, domestic_sites: bool, block_a run_cmd(cmd_args) +@cli.command('warp-status') +def warp_status(): + output = run_cmd(['bash', Command.STATUS_WARP.value]) + if output: + print(output) + @cli.command('telegram') @click.option('--action', '-a', required=True, help='Action to perform: start or stop', type=click.Choice(['start', 'stop'], case_sensitive=False)) @click.option('--token', '-t', required=False, help='Token for running the telegram bot', type=str)