diff --git a/agent-node/VERSION b/agent-node/VERSION index 66c4c22..7ee7020 100644 --- a/agent-node/VERSION +++ b/agent-node/VERSION @@ -1 +1 @@ -1.0.9 +1.0.10 diff --git a/agent-node/install_service.py b/agent-node/install_service.py index b05c7d2..d6c0672 100755 --- a/agent-node/install_service.py +++ b/agent-node/install_service.py @@ -110,6 +110,7 @@ fi echo "Starting Cortex Agent..." mkdir -p "$(dirname "$LOGFILE")" + cd "{get_working_dir()}" nohup {get_python_path()} {get_agent_main_path()} >> "$LOGFILE" 2>&1 & echo $! > "$PIDFILE" echo "Agent started (PID $!)" diff --git a/agent-node/src/agent_node/config.py b/agent-node/src/agent_node/config.py index f321761..8510cfb 100644 --- a/agent-node/src/agent_node/config.py +++ b/agent-node/src/agent_node/config.py @@ -3,7 +3,9 @@ import yaml # Path to the generated config file in the bundled distribution -CONFIG_PATH = "agent_config.yaml" +# It sits next to the 'src' directory (two levels up from src/agent_node/config.py) +_current_dir = os.path.dirname(os.path.abspath(__file__)) +CONFIG_PATH = os.path.abspath(os.path.join(_current_dir, "..", "..", "agent_config.yaml")) # Default values _defaults = {