Let var_* answer the optional add-on prompts (#17858)

Thirty-six yes/no prompts for optional components in 26 install
scripts could only be answered at the terminal, so an unattended
install stopped at the first one. Each now takes var_<app>_<option>
first and still asks when it is unset. The four conditions that only
matched a single y now take yes as well, since that is what the website
sends.
This commit is contained in:
CanbiZ (MickLesk)
2026-10-11 15:44:05 +02:00
committed by GitHub
parent afdd1560ae
commit 7198d218be
26 changed files with 76 additions and 39 deletions
+4 -2
View File
@@ -124,7 +124,8 @@ EOF
systemctl restart postgresql
msg_ok "Installed PostgreSQL"
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
prompt="${var_postgresql_adminer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer"
$STD apt install -y adminer
@@ -158,7 +159,8 @@ setup_alpine() {
$STD rc-service postgresql restart
msg_ok "Configured and Restarted PostgreSQL"
read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
prompt="${var_postgresql_adminer:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer and dependencies"
$STD apk add --no-cache \