configure.sh: seed wizard from setup_system.conf when it exists

Use config/setup_system.conf as the template for configure.conf when
present, so existing values appear as defaults. Falls back to the dist
file on a fresh install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel unbrot Pätzold
2026-05-03 13:51:39 +02:00
parent 94e857f340
commit 3e78a77623
+7 -1
View File
@@ -5,9 +5,15 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)" SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist"
CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf" CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf"
CONF_EXISTING="${SCRIPTDIR}/../config/setup_system.conf"
if [[ -f "$CONF_EXISTING" ]]; then
CONF_DIST="$CONF_EXISTING"
else
CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist"
fi
# Prompt for a single value; returns the old value unchanged if the user presses Enter. # Prompt for a single value; returns the old value unchanged if the user presses Enter.
prompt_value() { prompt_value() {
local name="$1" current="$2" new_val local name="$1" current="$2" new_val