sp-hydra-veil-gui/gui/v2/actions/singbox_prereqs.py
2026-08-21 11:39:18 -04:00

20 lines
602 B
Python
Executable file

from core.services.helpers.install_dependencies import SUDO_SINGBOX_LOCATION
from core.services.helpers.setup_sudo_scripts import (
is_singbox_wrapper_ready,
test_if_in_sudo_folder,
)
from core.utils.basic_operations.does_file_exist import does_file_exist
def singbox_prereqs_installed():
try:
if not is_singbox_wrapper_ready():
return False
sudo_scripts = test_if_in_sudo_folder()
if not getattr(sudo_scripts, "valid", False):
return False
return does_file_exist(SUDO_SINGBOX_LOCATION)
except Exception:
return False