- scripts/webui/data/generators/updater/webui_updater_scan.sh (webuiUpdaterScan):
writes frontend/data/updater/generated/{updates,cves,history}.json from the
installed-apps DB (current image per app from compose). Available-version +
CVE-scanner are clearly-marked pluggable hooks; always emits valid JSON.
- scripts/cli/commands/updater/{cli_updater_commands.sh,cli_updater_header.sh}:
auto-dispatched as 'libreportal updater <sub>' (check/apply/apply-all/rollback).
apply does disaster-recovery FIRST — snapshots the app via the backup engine,
then pulls + recreates (real dockerComposeUp/compose-pull helpers), records
history, and auto-rolls-back on failure. Standard LIBREPORTAL_TASK_EXEC
enqueue/exec split so WebUI + CLI share locking + audit trail.
New .sh files: the array/function-manifest regen self-heals on deploy; the
check path also sources its generator on demand to cover the gap.
NOTE: host-side bash — written to the repo's conventions but not runnable in
this env; this is the surface to test (the WebUI feature is lp-shot-verified).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
21 lines
886 B
Bash
21 lines
886 B
Bash
#!/bin/bash
|
|
|
|
# App Updater Commands Header
|
|
# Shows available `libreportal updater` subcommands.
|
|
|
|
cliShowUpdaterHelp()
|
|
{
|
|
echo ""
|
|
echo "Available App Updater Commands:"
|
|
echo ""
|
|
echo " libreportal updater check - Refresh per-app version & vulnerability data"
|
|
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 ""
|
|
}
|