diff --git a/proxy/common/config_manager.py b/proxy/common/config_manager.py index 7190746..811cc2e 100644 --- a/proxy/common/config_manager.py +++ b/proxy/common/config_manager.py @@ -10,7 +10,6 @@ class ProxyConfig: """Common configurations for the Proxy Server.""" def __init__(self): - print("hello in init of ProxyConfig") self.policies = self._load_policies() def _load_policies(self) -> str: @@ -18,7 +17,6 @@ class ProxyConfig: Loads and validates policies from the file specified in POLICIES_FILE_PATH. Returns the policy file content as a string if valid; otherwise, raises an error. """ - print("hello in load_policies") policies_file = os.getenv("POLICIES_FILE_PATH", "") if not policies_file: diff --git a/run.sh b/run.sh index 6fb27a7..4f29c59 100755 --- a/run.sh +++ b/run.sh @@ -20,8 +20,11 @@ up() { shift done - if [[ -n "$POLICIES_FILE_PATH" ]]; then + if [[ -n "$POLICIES_FILE_PATH" && -f "$POLICIES_FILE_PATH" ]]; then POLICIES_FILE_PATH=$(realpath "$POLICIES_FILE_PATH") + else + echo "Error: Specified policies file does not exist: $POLICIES_FILE_PATH" + exit 1 fi # Start Docker Compose with the correct environment variable