LibrePortal/scripts/cli/commands/updater/cli_updater_header.sh
librelad fa47e16cab feat(updater): automatic background scan for versions, CVEs & improvements
Replace the click-to-scan-only flow with a self-throttled auto-scan that
rides the existing task-processor idle poll (the same shape as the
network-drift check — no new daemon, unit, or endpoint):

- 'libreportal updater check auto' gates on the age of the generated
  updates.json vs CFG_UPDATER_SCAN_INTERVAL (minutes, default 30,
  0 disables); a fresh file makes the 60s tick a single stat() + return.
  Manual checks and post-update rescans reset the clock for free, and a
  missing file means the first scan runs ~a minute after install.
- Eligible signed hotfixes keep flowing through artifactApplyAuto, which
  only enqueues ordinary tasks — mutations stay on the task path.
- Open updater surfaces (standalone /updater and the fleet Overview's
  headless UpdaterPage) follow along with a 60s static-JSON re-read that
  repaints only when a generated_at stamp changed; timer released via
  dispose() on unmount, ticks skipped while hidden.
- Empty states now say the first scan happens automatically; Check now
  stays as the immediate manual override.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-06-12 22:07:42 +01:00

23 lines
1.1 KiB
Bash

#!/bin/bash
# App Updater Commands Header
# Shows available `libreportal updater` subcommands.
cliShowUpdaterHelp()
{
echo ""
echo "Available App Updater Commands:"
echo ""
echo " libreportal updater check [auto] - Refresh per-app version & vulnerability data"
echo " (auto = background mode: only scans when the data is"
echo " older than CFG_UPDATER_SCAN_INTERVAL minutes)"
echo " libreportal updater apply <app> - Update one app (snapshots it first; auto-rollback on failure)"
echo " libreportal updater apply-all [a,b] - Update a comma-list of apps (each snapshotted first)"
echo " libreportal updater rollback <app> - Restore an app's most recent pre-update snapshot"
echo ""
echo "Every update takes a recovery snapshot via the Backup engine before"
echo "touching the app, so any update is reversible. These commands back the"
echo "WebUI Updates page (features/updater); actions run through the task system."
echo ""
}