mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-25 16:53:36 +05:00
refactor: remove ipv6 check
doesn't seem to be necessary Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -24,7 +24,6 @@ from components.webui_client.client_config.client_config_setup import (
|
||||
from components.webui_client.client_dialogs import (
|
||||
print_client_port_select_dialog,
|
||||
print_install_client_config_dialog,
|
||||
print_ipv6_warning_dialog,
|
||||
print_moonraker_not_found_dialog,
|
||||
)
|
||||
from components.webui_client.client_utils import (
|
||||
@@ -50,7 +49,6 @@ from utils.fs_utils import (
|
||||
from utils.input_utils import get_confirm, get_number_input
|
||||
from utils.logger import Logger
|
||||
from utils.sys_utils import (
|
||||
check_ipv6,
|
||||
cmd_sysctl_service,
|
||||
download_file,
|
||||
get_ipv4_addr,
|
||||
@@ -114,13 +112,6 @@ def install_client(client: BaseWebClient) -> None:
|
||||
)
|
||||
valid_port = is_valid_port(port, ports_in_use)
|
||||
|
||||
# check if ipv6 is enabled, as this may cause issues with nginx
|
||||
if check_ipv6():
|
||||
print_ipv6_warning_dialog()
|
||||
if not get_confirm(f"Continue with {client.display_name} installation?"):
|
||||
Logger.print_info(f"Exiting {client.display_name} installation ...")
|
||||
return
|
||||
|
||||
check_install_dependencies(["nginx", "unzip"])
|
||||
|
||||
try:
|
||||
|
||||
@@ -402,34 +402,3 @@ def log_process(process: Popen) -> None:
|
||||
|
||||
if process.poll() is not None:
|
||||
break
|
||||
|
||||
|
||||
def check_ipv6() -> bool:
|
||||
"""
|
||||
Check if IPv6 is enabled
|
||||
:return: True if IPv6 is enabled, False otherwise
|
||||
"""
|
||||
try:
|
||||
file1 = Path("/proc/sys/net/ipv6/conf/all/disable_ipv6")
|
||||
if file1.exists():
|
||||
with open(file1, "r") as file:
|
||||
if file.read().strip() == "0":
|
||||
return True
|
||||
elif file.read().strip() == "1":
|
||||
return False
|
||||
|
||||
file3 = Path("/etc/sysctl.conf")
|
||||
if file3.exists():
|
||||
with open(file3, "r") as file:
|
||||
for line in file.readlines():
|
||||
if (
|
||||
"net.ipv6.conf.all.disable_ipv6" in line
|
||||
and not line.startswith("#")
|
||||
and line.split("=")[1].strip() == "0"
|
||||
):
|
||||
return True
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
Logger.print_error(f"Error checking IPv6: {e}")
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user