fix: non-disruptive startup checks + clean service lifecycle (v1.3.1)

- Env check is read-only when state is sane: no pineapd command-socket
  writes, no live pool-list commits, no wifi reload; pineapd restarts only
  when a runtime-sensitive UCI value changed or the daemon was down
- Failed monitor repairs now fail the startup contract instead of being
  reported as fixed; runtime pool state is read from active config
- Enterprise AP recovery runs only on device boot (PAGER_WEBUI_BOOT), not
  on every web-service restart
- serve() gates the HTTP port on startup checks with bounded retries and
  shuts down cleanly on SIGTERM/SIGINT; the recon watchdog waits
  interruptibly
- Recon uses a bounded userspace channel scheduler that drives both
  monitor radios over non-DFS channels, with preflight verification,
  serialized starts, and per-cycle error reporting
- payload.sh waits for real readiness on start, fully removes the boot
  service (stop + disable + delete) on stop, and surfaces a
  stopped-but-enabled boot service; deploy.sh refreshes the installed
  init script even when the service is stopped
- Bump version to 1.3.1

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
2026-08-19 12:03:11 -05:00
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent 6e3968c19a
commit cd26553d21
8 changed files with 451 additions and 68 deletions
@@ -7,18 +7,24 @@ USE_PROCD=1
PAGER_WEBUI_DIR="/root/payloads/user/remote_access/pager-webui"
[ -f "$PAGER_WEBUI_DIR/server.py" ] || PAGER_WEBUI_DIR="/mmc/root/payloads/user/remote_access/pager-webui"
boot() {
PAGER_WEBUI_BOOT=1
start
}
start_service() {
[ -f "$PAGER_WEBUI_DIR/server.py" ] || return 1
chmod -R 755 "$PAGER_WEBUI_DIR" 2>/dev/null
procd_open_instance pagerwebui
procd_set_param command /usr/bin/python3 "$PAGER_WEBUI_DIR/server.py"
procd_set_param env PAGER_WEBUI_BOOT="${PAGER_WEBUI_BOOT:-0}"
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile /tmp/pagerwebui.pid
procd_set_param term_timeout 10
procd_close_instance
}
stop_service() {
rm -f /tmp/pagerwebui.pid
return 0
}