from pathlib import Path

_CONF_PATH = Path("/usr/share/imunify360-webshield/modularity_mode")


def is_standalone_mode() -> bool:
    try:
        return _CONF_PATH.read_text().strip() == "standalone"
    except FileNotFoundError:
        return True


def get_module_based_ports() -> set[int]:
    # For now - hardcoded values. In the future maybe remake to a config file.
    return {80, 443}
