Compare commits

..

No commits in common. "e24927ee6f17eada8eafe8eaa7e041b5bfc412b8" and "d4778126e4bf94475cdbc1ae002dfcd3133f5268" have entirely different histories.

3 changed files with 12 additions and 23 deletions

View File

@ -8,6 +8,7 @@ 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

@ -78,11 +78,3 @@ 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

@ -69,21 +69,17 @@ webuiLibrePortalUpdate() {
local result=$(webuiGenerateAppsToolsConfig)
checkSuccess "Generated apps-tools.json..."
# 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
# 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
# Generate Backup locations / snapshots / engines / dashboards
local result=$(webuiGenerateBackupLocations && webuiGenerateBackupDashboard && webuiGenerateBackupSnapshots all && webuiGenerateBackupAppStatus && webuiGenerateBackupEngines && webuiGenerateBackupSchema && webuiGenerateBackupPasswords)