From ac5afc188eb96d01b339a03749a712e4a432666b Mon Sep 17 00:00:00 2001 From: Willy Date: Mon, 4 May 2026 16:27:20 +0200 Subject: [PATCH] Update test.sh --- test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index cb593aa..5365242 100644 --- a/test.sh +++ b/test.sh @@ -15,10 +15,11 @@ echo # Vérification mariadb-backup est installé. -MariaBackupVersion=$(command mariabackup -v 2> /dev/null) +MariaBackupVersion=$(command mariabackup -v 2>&1 | grep -E '[0-9]+\.[0-9]') -if [ -z "$MariaBackupVersionj" ]; then +if [ -z "$MariaBackupVersion" ]; then echo "ERREUR: mariadb-backup non installé" + echo exit 1 fi @@ -31,9 +32,11 @@ MARIADB_VER=$(mariadb --version 2>&1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head # Comparaison des versions if [ "$BACKUP_VER" = "$MARIADB_VER" ]; then echo "OK Versions identiques" + echo exit 0 else echo "Attention versions différentes, veuillez installer la version adapté" + echo exit 0 fi