import os from pathlib import Path DEFAULT_STATE_DIR = Path("/var/lib/furtka-gateway") DEFAULT_DYNAMIC_DIR = Path("/var/lib/furtka-gateway/dynamic") def state_dir() -> Path: return Path(os.environ.get("GATEWAY_STATE_DIR", DEFAULT_STATE_DIR)) def dynamic_dir() -> Path: return Path(os.environ.get("GATEWAY_DYNAMIC_DIR", DEFAULT_DYNAMIC_DIR)) def db_path() -> Path: return state_dir() / "gateway.db" def deploy_state_file() -> Path: return state_dir() / "deploy-state.json"