Show PatchMon agent install failure output
This commit is contained in:
@@ -124,6 +124,13 @@ s = p.read_text()
|
||||
# enroll/configure the agent against the FQDN.
|
||||
s = re.sub(r'export PATCHMON_URL="[^"]+"', f'export PATCHMON_URL="{server}"', s)
|
||||
s = s.replace('http://192.168.20.232:3000', server)
|
||||
# PatchMon's generated auto-enroll script captures the real agent-install
|
||||
# output, but by default only prints a generic "Failed to install agent" line.
|
||||
# Make failures actionable for one-liner installs.
|
||||
s = s.replace(
|
||||
' error "Failed to install agent (exit: $install_exit_code)"',
|
||||
' printf "%s\\n" "$install_output" >&2\n error "Failed to install agent (exit: $install_exit_code)"',
|
||||
)
|
||||
p.write_text(s)
|
||||
PY
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user