A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
39 lines
927 B
Bash
39 lines
927 B
Bash
#!/bin/bash
|
|
|
|
restoreFirstRunDiscover()
|
|
{
|
|
local idx="$1"
|
|
|
|
if ! resticLocationEnabled "$idx"; then
|
|
isError "Location $idx is not enabled"
|
|
return 1
|
|
fi
|
|
|
|
resticEnvExport "$idx" || return 1
|
|
sudo -E -u "$docker_install_user" restic snapshots --tag engine=libreportal --json --no-lock 2>/dev/null
|
|
local rc=$?
|
|
resticEnvUnset
|
|
return $rc
|
|
}
|
|
|
|
restoreFirstRunBulk()
|
|
{
|
|
local idx="$1"
|
|
local source_host="$2"
|
|
shift 2
|
|
local apps_to_restore=("$@")
|
|
|
|
if [[ ${#apps_to_restore[@]} -eq 0 ]]; then
|
|
isError "No apps specified for bulk first-run restore"
|
|
return 1
|
|
fi
|
|
|
|
isHeader "First-run bulk restore from $(resticLocationName "$idx") (host=$source_host)"
|
|
|
|
for app in "${apps_to_restore[@]}"; do
|
|
restoreAppStart "$app" "latest" "$idx" "$source_host"
|
|
done
|
|
|
|
isSuccessful "First-run restore complete — ${#apps_to_restore[@]} apps restored"
|
|
}
|