From d7a8d4b3774d00696596479ee0312f2c7654cf57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20M=C3=B6lle?= Date: Mon, 17 Apr 2023 20:51:27 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Einstall.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 0b65008..8fb3ddb 100644 --- a/install.sh +++ b/install.sh @@ -9,13 +9,13 @@ fi # Check which Linux distribution is installed if [ -f /etc/debian_version ]; then echo "Detected Debian-based system." - DISTRO=debian + DISTRO="debian" elif [ -f /etc/redhat-release ]; then echo "Detected Red Hat-based system." - DISTRO=redhat + DISTRO="redhat" elif [ -f /etc/alpine-release ]; then echo "Detected Alpine Linux." - DISTRO=alpine + DISTRO="alpine" else echo "Unsupported Linux distribution." exit 1 @@ -23,12 +23,12 @@ fi # Install Docker echo "Installing Docker..." -if [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "ubuntu" ]; then +if [ "$DISTRO" = "debian" ] || [ "$DISTRO" = "ubuntu" ]; then apt-get update apt-get install -y docker.io -elif [ "$DISTRO" == "redhat" ]; then +elif [ "$DISTRO" = "redhat" ]; then yum install -y docker -elif [ "$DISTRO" == "alpine" ]; then +elif [ "$DISTRO" = "alpine" ]; then apk add docker fi @@ -38,15 +38,15 @@ systemctl start docker # Install Docker Compose read -p "Do you want to install Docker Compose? (y/n) " INSTALL_COMPOSE -if [ "$INSTALL_COMPOSE" == "y" ]; then +if [ "$INSTALL_COMPOSE" = "y" ]; then echo "Installing Docker Compose..." - if [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "ubuntu" ]; then + if [ "$DISTRO" = "debian" ] || [ "$DISTRO" = "ubuntu" ]; then apt-get install -y docker-compose - elif [ "$DISTRO" == "redhat" ]; then + elif [ "$DISTRO" = "redhat" ]; then yum install -y epel-release yum install -y python-pip pip install docker-compose - elif [ "$DISTRO" == "alpine" ]; then + elif [ "$DISTRO" = "alpine" ]; then apk add py-pip pip install docker-compose fi