From 13af901bca3f24b47f10fd88dbf955950dc4e552 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:23:36 +0100 Subject: [PATCH] Improve error message and variable check in DB setup Updated the error message in setup_mariadb_db to English for clarity. Improved the DB_PASS variable check in setup_postgresql_db to handle unset variables more robustly. --- misc/tools.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 9eec2d06b..5dd9e8cec 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -3078,7 +3078,7 @@ setup_mariadb() { function setup_mariadb_db() { if [[ -z "$DB_NAME" || -z "$DB_USER" ]]; then - msg_error "DB_NAME und DB_USER müssen gesetzt sein" + msg_error "DB_NAME and DB_USER must be set" return 1 fi @@ -3921,7 +3921,7 @@ function setup_postgresql_db() { fi # Generate password if not provided - if [[ -z "$DB_PASS" ]]; then + if [[ -z "${DB_PASS:-}" ]]; then DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) fi