Replaces the slow, interactive per-variable scan with a deterministic reconcile: each live config is rebuilt from its (freshly-cloned) template — keeping the user's existing values, adding new template keys (CFG_REQUIREMENT_CONFIGS_AUTO_UPDATE), and dropping keys the template no longer defines (new CFG_REQUIREMENT_CONFIGS_AUTO_DELETE, default true). Structure/order/comments follow the template; non-interactive; atomic with a .bak; refuses to act on a missing/empty template so a broken clone can't wipe a config. Applies to both general and per-app configs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
16 lines
590 B
Bash
Executable File
16 lines
590 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"
|
|
done < <(sudo find "$containers_dir" -maxdepth 2 -type f -name '*.config' ! -name '*.bak')
|
|
|
|
isSuccessful "Application config reconciliation completed."
|
|
}
|