Improve Robustness of Agent Foreground and Background Execution Modes #288
Labels
level/task
Task issue
module/agent
mvp
Minimum Viable Product refinement
type/enhancement
Enhancement issue
Parent Issue: #241
Description
The Wazuh agent currently has issues handling its execution modes when run with
--run
(foreground) or--start
(background) flags. Specifically, launching the agent in foreground with./wazuh-agent --run
can sometimes print the following message:This message typically indicates that an instance of the agent is already running. However, it may also appear if the agent's previous process terminated unexpectedly, which leads to unreliable behavior.
Proposed Solution
--run
and--start
behavior:--run
: Should only launch the agent in the foreground without checking if an instance is already running.--start
: Should launch the agent in the background and include checks to ensure no other instance of the agent is running.When using
--start
, the agent should:--run
).The text was updated successfully, but these errors were encountered: