Four fixes that make the auto-updater a trustworthy background system: * CFG_UPDATER_WINDOW (default 06:00-08:00 host time, right after the 05:00 backup cron; HH:MM-HH:MM wraps midnight, 'always' = any time). Gates only the enqueue — scans keep running all day, so the Updates page stays current and pending updates visibly wait for the window. Malformed values fail closed and are rejected by the WebUI validator. * "Check now" actually checks: an explicit `updater check` sets UPDATER_REGISTRY_FORCE=1. The flag existed but nothing ever set it, so the button silently reused the 6h digest cache and could not find a build the user knew had shipped. Force also overrides interval 0, which now means "manual-only" as documented in the roadmap. * Registry stamp moved from /tmp to <system>/logs: the task processor runs under PrivateTmp, so daemon and CLI each kept a separate 6h clock and the daemon's reset on every service restart. * A failed automatic attempt is no longer invisible: the scan emits auto_attempted_digest (the one-shot no-retry stamp), and when it matches the available build the UI stops promising an install that will never come — per-app detail explains, the fleet row gets an "auto failed" chip, and the Overview board counts it as needing you. Also corrects the CFG_TIMEZONE label: it sets the containers' TZ only; scheduled tasks follow the host clock (timedatectl), and the old "Timezone for scheduled tasks" wording promised a knob that never existed. The window + auto_window display state plainly WHEN updates land, answering "how does the user know when the next update happens". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
31 lines
1.6 KiB
Bash
31 lines
1.6 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 ""
|
|
echo "Automatic updates: each check enqueues the update for every app set to"
|
|
echo "CFG_<APP>_UPDATE_TYPE=auto (the default) — the same snapshot-first apply"
|
|
echo "as pressing Update, recorded in History as automatic. They install only"
|
|
echo "inside CFG_UPDATER_WINDOW (default 06:00-08:00 host time, right after"
|
|
echo "the nightly backups); checks still run all day. Set an app to 'manual'"
|
|
echo "on its Configure page to hold it back, or CFG_UPDATER_AUTO=false to"
|
|
echo "hold back every app. A build that fails is never auto-retried."
|
|
echo ""
|
|
}
|