mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 00:03:42 +05:00
fix(webclients): default to port 80 if none/invalid configured in kiauh.cfg
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -71,7 +71,6 @@ def print_client_port_select_dialog(name: str, port: str, ports_in_use: List[str
|
|||||||
| {line2:<54}|
|
| {line2:<54}|
|
||||||
| port, you can set it now. Make sure the port is not |
|
| port, you can set it now. Make sure the port is not |
|
||||||
| used by any other application on your system! |
|
| used by any other application on your system! |
|
||||||
\\=======================================================/
|
|
||||||
"""
|
"""
|
||||||
)[1:]
|
)[1:]
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ def install_client(client_name: ClientName) -> None:
|
|||||||
install_client_cfg = get_confirm(question, allow_go_back=False)
|
install_client_cfg = get_confirm(question, allow_go_back=False)
|
||||||
|
|
||||||
cm = ConfigManager(cfg_file=KIAUH_CFG)
|
cm = ConfigManager(cfg_file=KIAUH_CFG)
|
||||||
client_port = cm.get_value(client.get("name"), "port")
|
default_port = cm.get_value(client.get("name"), "port")
|
||||||
|
client_port = default_port if default_port and default_port.isdigit() else "80"
|
||||||
ports_in_use = read_ports_from_nginx_configs()
|
ports_in_use = read_ports_from_nginx_configs()
|
||||||
|
|
||||||
# check if configured port is a valid number and not in use already
|
# check if configured port is a valid number and not in use already
|
||||||
|
|||||||
Reference in New Issue
Block a user