LibrePortal/scripts/config/application/application_missing_variables.sh
librelad 32c33e27be fix(install): silence find-permission noise on early best-effort scans
Early in an install the docker-type config isn't loaded yet, so runFileOp
falls back to the manager, which can't list the container-owned (751)
/docker/containers/ dir. Two best-effort scans then leaked
"find: '/docker/containers/': Permission denied" to the install output
(x3 per run): scan_files.sh's app_configs scan and the application config
reconcile. No app configs exist that early on a fresh install, so the
empty result is correct — just suppress the find stderr (the -print0
output still flows). Cosmetic only; doesn't change what's enumerated once
the config is loaded.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-24 22:39:43 +01:00

19 lines
855 B
Bash
Executable File

#!/bin/bash
# Reconcile each application's config ($containers_dir/<app>/<app>.config) against
# its freshly-cloned template ($install_containers_dir). See reconcileConfigFile.
checkApplicationsConfigFilesMissingVariables()
{
local live app remote
while IFS= read -r live; do
app=$(basename "$live" .config)
remote="$install_containers_dir$app/$app.config"
reconcileConfigFile "$live" "$remote"
# 2>/dev/null: before the docker-type config loads (early install) runFileOp
# falls back to the manager, which can't list the container-owned containers/
# dir — harmless "Permission denied" on a best-effort reconcile (no apps yet).
done < <(runFileOp find "$containers_dir" -maxdepth 2 -type f -name '*.config' ! -name '*.bak' 2>/dev/null)
isSuccessful "Application config reconciliation completed."
}