From d6ea575f4d44d38e6cf550641d28b3940b318bf3 Mon Sep 17 00:00:00 2001 From: Elian Loraux <elian.loraux@tetras-libre.fr> Date: Wed, 2 Apr 2025 16:11:05 +0200 Subject: [PATCH] Protect MariaDB Pass variable --- backup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backup.sh b/backup.sh index 92d0393..506bb96 100644 --- a/backup.sh +++ b/backup.sh @@ -2,6 +2,11 @@ echo "Backing up Keycloak DB and config" +if [ -z "$MARIADB_PASS" ]; then + echo "Error: the MARIADB_PASS variable is not set or is empty." + exit 1 +fi + if [ ! -d "backups" ]; then mkdir "backups" fi -- GitLab