From 1e19c23f1da182a347413042d3f6cff1833e9ded Mon Sep 17 00:00:00 2001 From: maxime Date: Wed, 25 Mar 2026 01:16:57 +0100 Subject: [PATCH] version 1.3 --- DB/export_db.sh | 1 + DB/main.sh | 25 +++++++++++++++++++++++++ main.sh | 21 +++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 DB/export_db.sh create mode 100644 DB/main.sh diff --git a/DB/export_db.sh b/DB/export_db.sh new file mode 100644 index 0000000..c642cb2 --- /dev/null +++ b/DB/export_db.sh @@ -0,0 +1 @@ +echo 'je le ferai plus tard wola il est 1h15 du mat ça fait 5h je suis sur le projet la y'a superman il m'attend sur hbo' \ No newline at end of file diff --git a/DB/main.sh b/DB/main.sh new file mode 100644 index 0000000..fab8892 --- /dev/null +++ b/DB/main.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +cat << 'EOF' +======================= +Vérification de mariaDB +=========================== +EOF + +echo "Vérification / Installation de mariadb..." +if ! apt install mariadb-server -y; then + echo "Erreur lors de l'installation de mariadb-server" + exit 1 +fi +MARIADB_VERSION=$(mariadb --version 2>&1) +echo "$MARIADB_VERSION installé" +sleep 1 + +echo "Vérification / Installation de phpMyAdmin..." +if ! apt install phpmyadmin -y; then + echo "Erreur lors de l'installation de phpMyAdmin" + exit 1 +fi +PHP_VERSION=$(php --version 2>&1 | head -n 1) +echo "$PHP_VERSION installé" +sleep 1 \ No newline at end of file diff --git a/main.sh b/main.sh index 59ac2c5..a02a9aa 100755 --- a/main.sh +++ b/main.sh @@ -54,6 +54,25 @@ fi echo "Système mis à jour" sleep 1 + +#---------------------------- +# 2. Installation de MariaDB x phpmyadmin +#------------------------------ +bash DB/main.sh + + +#------------------------------- +# 3. Exportation des DB +#-------------------------------- +read -p "Voulez-vous exporter des DB existantes ? (y/n) : " choix + +if [ "$choix" = "y" ]; then + bash "$(dirname "$0")/export_db.sh" +fi + +echo 'je sais ya un problème de numéro mais wola aller lire le script db/export_db.sh je suis claquax au sol sur terre' + + # ---------------------------- # 2. Installation de Python # ---------------------------- @@ -67,6 +86,8 @@ echo " $PYTHON_VERSION installé" echo " $PYTHON_VERSION installé" sleep 1 + + # ---------------------------- # 3. Recherche des venvs existants # ----------------------------