Fix 8 issues from code review

- ha-poller: replace recursive main() retry with while loop (stack overflow fix)
- ha-poller: advance last_push on empty HA response (log spam fix)
- ha-poller: use datetime.now(timezone.utc) instead of deprecated utcnow()
- ping-probe: always call update_status() unconditionally so offline devices register as offline
- agent.php: heartbeat reads status from payload instead of hardcoding 'online'
- phone-probe: delegate JSON building to python3 (bash concatenation injection fix)
- netscan + phone-probe: read registration key from /etc/jarvis-agent/reg-key
- admin/index.php: sync ha_list skipDomains with ha.php (14 missing domains added)
- facts_collector: self-check JARVIS via 127.0.0.1 instead of Cloudflare hairpin
This commit is contained in:
2026-06-29 20:58:22 -05:00
parent c1275d47a6
commit 90e4ded7c9
7 changed files with 43 additions and 20 deletions
+1 -2
View File
@@ -93,8 +93,7 @@ def main():
status = "online" if alive else "offline"
print(f"{agent_id} ({ip}): {status}", flush=True)
heartbeat(agent_id, api_key, alive)
if alive:
update_status(agent_id, api_key, status)
update_status(agent_id, api_key, status)
if __name__ == "__main__":
main()