Documentation
¶
Overview ¶
Package agentconfig stores the persistent agent token at /etc/ghostpsy/agent.conf.
The file holds a single line: the raw bearer token. Permissions are enforced to 0600 owner=root so a non-privileged user on the host cannot read the credential. Tests override the path via GHOSTPSY_AGENT_CONFIG_PATH.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotConfigured = errors.New("agent not registered: agent.conf is missing")
ErrNotConfigured signals that no persistent token exists yet (the agent has not been registered on this host).
Functions ¶
func Exists ¶
func Exists() bool
Exists reports whether the persistent agent token file is already on disk.
Used by “register“ to refuse re-runs (with a clear error) and by idempotent install scripts to decide between “register“ and a plain “scan --yes“. Permission errors fall through as "does not exist" so callers see a single source of truth: the file is treated as already-configured when it is readable; anything else means register should attempt to write it.
Types ¶
This section is empty.