From 085b655d9f546eb609b6d24a6e40478527e08f2d Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 28 Nov 2023 13:02:12 +0100 Subject: [PATCH] Update version to 1.1.0 and add support for Redhat and Sles based operating systems --- scripts/install.sh | 52 ++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index cad2599e9..6a4e1c9f3 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,7 +1,7 @@ #!/bin/bash ## Do not modify this file. You will lose the ability to install and auto-update! -VERSION="1.0.4" +VERSION="1.1.0" DOCKER_VERSION="24.0" CDN="https://cdn.coollabs.io/coolify" @@ -14,32 +14,14 @@ if [ $EUID != 0 ]; then echo "Please run as root" exit fi -# case "$OS_TYPE" in -# ubuntu | debian | raspbian) -# echo "Installing dependencies with APT..." -# apt update -y >/dev/null 2>&1 -# apt install -y curl wget git jq >/dev/null 2>&1 -# ;; -# centos | fedora | rhel | ol | rocky) -# echo "Installing dependencies with DNF..." -# dnf update -y >/dev/null 2>&1 -# dnf install -y curl wget git jq >/dev/null 2>&1 -# ;; -# sles | opensuse-leap | opensuse-tumbleweed) -# echo "Installing dependencies with Zypper..." -# zypper refresh >/dev/null 2>&1 -# zypper install -y curl wget git jq >/dev/null 2>&1 -# ;; -# *) -# echo "This script only supports Debian, Redhat or Sles based operating systems for now." -# exit -# ;; -# esac -if [ $OS_TYPE != "ubuntu" ] && [ $OS_TYPE != "debian" ] && [ $OS_TYPE != "raspbian" ]; then - echo "This script only supports Ubuntu and Debian for now." +case "$OS_TYPE" in +ubuntu | debian | raspbian | centos | fedora | rhel | ol | rocky | sles | opensuse-leap | opensuse-tumbleweed) ;; +*) + echo "This script only supports Debian, Redhat or Sles based operating systems for now." exit -fi + ;; +esac # Ovewrite LATEST_VERSION if user pass a version number if [ "$1" != "" ]; then @@ -58,8 +40,24 @@ echo "Coolify version: $LATEST_VERSION" echo -e "-------------" echo "Installing required packages..." -apt update -y >/dev/null 2>&1 -apt install -y curl wget git jq >/dev/null 2>&1 +case "$OS_TYPE" in +ubuntu | debian | raspbian) + apt update -y >/dev/null 2>&1 + apt install -y curl wget git jq >/dev/null 2>&1 + ;; +centos | fedora | rhel | ol | rocky) + dnf update -y >/dev/null 2>&1 + dnf install -y curl wget git jq >/dev/null 2>&1 + ;; +sles | opensuse-leap | opensuse-tumbleweed) + zypper refresh >/dev/null 2>&1 + zypper install -y curl wget git jq >/dev/null 2>&1 + ;; +*) + echo "This script only supports Debian, Redhat or Sles based operating systems for now." + exit + ;; +esac if ! [ -x "$(command -v docker)" ]; then echo "Docker is not installed. Installing Docker..."