From 069bda492a3e8ede244408e86faba725b6d3596c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 2 Jun 2025 11:14:27 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/tools.func b/misc/tools.func index bb5cfb17..d63d2a5d 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -320,7 +320,8 @@ install_mysql() { echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ >/etc/apt/sources.list.d/mysql.list - MYSQL_ROOT_PASSWORD="$(tr -dc A-Za-z0-9 /dev/null | head -c 16 || echo 'Fallback123!')" + MYSQL_ROOT_PASSWORD="$(tr -dc A-Za-z0-9 /dev/null | head -c 16)" + [[ -z "$MYSQL_ROOT_PASSWORD" ]] && MYSQL_ROOT_PASSWORD="Fallback123!" export DEBIAN_FRONTEND=noninteractive debconf-set-selections <<<"mysql-community-server mysql-community-server/root-pass password $MYSQL_ROOT_PASSWORD" debconf-set-selections <<<"mysql-community-server mysql-community-server/re-root-pass password $MYSQL_ROOT_PASSWORD"