fix: agent config search order — 1st arg > /etc/ > ~/.config/ #44

Merged
rafaga21 merged 1 commits from feat/push-monitoring-agent-v2 into master 2026-06-11 19:39:13 -04:00
Owner

The systemd service runs as root so /root is /root, but config is
written to /etc/servermanager/agent.conf. The agent now tries:

  1. Path from command-line argument
  2. /etc/servermanager/agent.conf (system mode)
  3. $HOME/.config/servermanager/agent.conf (user mode)

Service ExecStart and cron job both pass the config path explicitly.

The systemd service runs as root so /root is /root, but config is written to /etc/servermanager/agent.conf. The agent now tries: 1. Path from command-line argument 2. /etc/servermanager/agent.conf (system mode) 3. $HOME/.config/servermanager/agent.conf (user mode) Service ExecStart and cron job both pass the config path explicitly.
rafaga21 added 1 commit 2026-06-11 19:39:09 -04:00
The systemd service runs as root so /root is /root, but config is
written to /etc/servermanager/agent.conf. The agent now tries:
1. Path from command-line argument
2. /etc/servermanager/agent.conf (system mode)
3. $HOME/.config/servermanager/agent.conf (user mode)

Service ExecStart and cron job both pass the config path explicitly.
rafaga21 merged commit 05cf026867 into master 2026-06-11 19:39:13 -04:00
rafaga21 deleted branch feat/push-monitoring-agent-v2 2026-06-11 19:39:15 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: devlab/server-manager#44