Merge claude/1

This commit is contained in:
librelad 2026-05-25 23:44:42 +01:00
commit e24927ee6f
3 changed files with 23 additions and 12 deletions

View File

@ -78,3 +78,11 @@ webuiGenerateGluetunProviders() {
isNotice "Empty gluetun snapshot generated; ignoring."
fi
}
# Routine WebUI-update hook (appWebuiRefresh_<app>): keep the provider snapshot
# fresh on every WebUI update while gluetun is installed. The installer
# (gluetun.sh) refreshes on first install and the 'gluetun_refresh_providers'
# tool refreshes on demand; this covers the in-between drift.
appWebuiRefresh_gluetun() {
webuiGenerateGluetunProviders
}

View File

@ -8,7 +8,6 @@ webui_scripts=(
"webui/data/generators/apps/webui_app_status.sh"
"webui/data/generators/apps/webui_config_patch.sh"
"webui/data/generators/apps/webui_config.sh"
"webui/data/generators/apps/webui_gluetun_providers.sh"
"webui/data/generators/apps/webui_services.sh"
"webui/data/generators/apps/webui_tools.sh"
"webui/data/generators/backup/webui_backup_app_status.sh"

View File

@ -69,17 +69,21 @@ webuiLibrePortalUpdate() {
local result=$(webuiGenerateAppsToolsConfig)
checkSuccess "Generated apps-tools.json..."
# Only refresh the gluetun provider snapshot when gluetun is
# actually deployed — the upstream servers.json is ~7 MB and
# routine WebUI updates shouldn't burn that bandwidth for users
# who never install gluetun. The gluetun installer itself
# (containers/gluetun/gluetun.sh) refreshes on first install,
# and the Tools action 'gluetun_refresh_providers' lets users
# refresh on demand.
if [[ -f "${containers_dir}gluetun/docker-compose.yml" ]]; then
local result=$(webuiGenerateGluetunProviders)
checkSuccess "Refreshed gluetun provider snapshot..."
fi
# Per-app routine refresh hooks. An installed app may define
# appWebuiRefresh_<app> (in containers/<app>/scripts/) for data it
# wants refreshed on every WebUI update — e.g. gluetun's provider
# snapshot. Gated on the app being installed (its live compose
# exists, tested directly so it works without list perm on the
# container-user-owned data dir), so non-users never pay for it.
local _app _dir _hook
for _dir in "${install_containers_dir}"*/; do
_app="$(basename "$_dir")"
[[ -f "${containers_dir}${_app}/docker-compose.yml" ]] || continue
_hook="appWebuiRefresh_${_app}"
declare -F "$_hook" >/dev/null 2>&1 || continue
local result=$($_hook)
checkSuccess "Refreshed ${_app} WebUI data..."
done
# Generate Backup locations / snapshots / engines / dashboards
local result=$(webuiGenerateBackupLocations && webuiGenerateBackupDashboard && webuiGenerateBackupSnapshots all && webuiGenerateBackupAppStatus && webuiGenerateBackupEngines && webuiGenerateBackupSchema && webuiGenerateBackupPasswords)