|
11 | 11 | from mypyconsole.mypyconsole import MyPyConsole |
12 | 12 |
|
13 | 13 | from mytoninstaller.config import GetLiteServerConfig, get_ls_proxy_config |
| 14 | +from mytoninstaller.node_args import get_node_args |
14 | 15 | from mytoninstaller.utils import GetInitBlock |
15 | 16 | from mytoncore.utils import dict2b64, str2bool, b642dict |
16 | 17 |
|
@@ -111,16 +112,22 @@ def Status(local, args): |
111 | 112 | liteserver_key = keys_dir + "liteserver" |
112 | 113 | liteserver_pubkey = liteserver_key + ".pub" |
113 | 114 |
|
114 | | - |
115 | | - fnStatus = os.path.isfile(local.buffer.vconfig_path) |
116 | | - mtcStatus = os.path.isfile(local.buffer.mconfig_path) |
117 | | - vcStatus = os.path.isfile(server_key) or os.path.isfile(client_key) |
118 | | - lsStatus = os.path.isfile(liteserver_pubkey) |
119 | | - |
120 | | - print("Full node status:", fnStatus) |
121 | | - print("Mytoncore status:", mtcStatus) |
122 | | - print("V.console status:", vcStatus) |
123 | | - print("Liteserver status:", lsStatus) |
| 115 | + statuses = { |
| 116 | + 'Full node status': os.path.isfile(local.buffer.vconfig_path), |
| 117 | + 'Mytoncore status': os.path.isfile(local.buffer.mconfig_path), |
| 118 | + 'V.console status': os.path.isfile(server_key) or os.path.isfile(client_key), |
| 119 | + 'Liteserver status': os.path.isfile(liteserver_pubkey) |
| 120 | + } |
| 121 | + |
| 122 | + color_print("{cyan}===[ Services status ]==={endc}") |
| 123 | + for item in statuses.items(): |
| 124 | + status = '{green}enabled{endc}' if item[1] else '{red}disabled{endc}' |
| 125 | + color_print(f"{item[0]}: {status}") |
| 126 | + |
| 127 | + node_args = get_node_args() |
| 128 | + color_print("{cyan}===[ Node arguments ]==={endc}") |
| 129 | + for key, value in node_args.items(): |
| 130 | + print(f"{key}: {value}") |
124 | 131 | #end define |
125 | 132 |
|
126 | 133 |
|
|
0 commit comments