Actualiser run.sh

This commit is contained in:
the_booth 2024-08-28 23:26:23 +02:00
parent 0ef965f04f
commit 84d4a8a821

27
run.sh
View File

@ -1,30 +1,29 @@
#!/bin/bash #!/bin/bash
# Récupère la version du système # Récupère la version du système
os_system=`cat /etc/os-release` os_system=$(cat /etc/os-release)
os_format=${os_system,,} os_format=${os_system,,}
function debian() { function install_debian() {
apt-get update sudo apt-get update
apt-get install sudo curl sudo apt-get install -y sudo curl
} }
function fedora() { function install_fedora() {
dnf update sudo dnf update -y
dnf install sudo curl sudo dnf install -y sudo curl
} }
# Install Debian pour : Debian, Ubuntu, Kali, ParrotOS # Install pour Debian, Ubuntu, Kali, ParrotOS
if [[ $os_format == *"debian"* ]]; then if [[ $os_format == *"debian"* || $os_format == *"ubuntu"* || $os_format == *"kali"* || $os_format == *"parrot"* ]]; then
debian(); install_debian
elif [[ $os_format == *"fedora"* ]]; then elif [[ $os_format == *"fedora"* ]]; then
fedora(); install_fedora
fi fi
# Installation de Docker # Installation de Docker
curl -fsSL https://get.docker.com -o get-docker.sh curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh sudo sh get-docker.sh
# Démarrage du docker compose # Démarrage de Docker Compose
docker compose up -d --build sudo docker compose up -d --build