From 416e8a4cc149e45756efb019a13d4ef0b46ccb16 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 8 Nov 2023 13:15:55 +0100 Subject: [PATCH 01/16] Update cyberpanel.sh with RHEL and Centos 9 detection --- cyberpanel.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 342f3b96c..d09536420 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -257,8 +257,10 @@ if ! uname -m | grep -qE 'x86_64|aarch64' ; then exit fi -if grep -q -E "CentOS Linux 7|CentOS Linux 8" /etc/os-release ; then +if grep -q -E "CentOS Linux 7|CentOS Linux 8|CentOS Stream" /etc/os-release ; then Server_OS="CentOS" +elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then + Server_OS="RedHat" elif grep -q "AlmaLinux-8" /etc/os-release ; then Server_OS="AlmaLinux" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then @@ -271,8 +273,8 @@ elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then Server_OS="openEuler" else echo -e "Unable to detect your system..." - echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n" - Debug_Log2 "CyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]" + echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n" + Debug_Log2 "CyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, CentOS 9, RHEL 8, RHEL 9, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]" exit fi @@ -281,7 +283,7 @@ Server_OS_Version=$(grep VERSION_ID /etc/os-release | awk -F[=,] '{print $2}' | echo -e "System: $Server_OS $Server_OS_Version detected...\n" -if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] ; then +if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] || [[ "$Server_OS" = "RedHat" ]] ; then Server_OS="CentOS" #CloudLinux gives version id like 7.8, 7.9, so cut it to show first number only #treat CloudLinux, Rocky and Alma as CentOS From 6320a78305e3d6091c80e511f7cc9221b649119f Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 10:46:24 +0100 Subject: [PATCH 02/16] Update cyberpanel.sh with CentOS 9 support --- cyberpanel.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cyberpanel.sh b/cyberpanel.sh index d09536420..1448282bc 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -833,6 +833,19 @@ if [[ $Server_OS = "CentOS" ]] ; then rm -f /etc/yum.repos.d/epel.repo rm -f /etc/yum.repos.d/epel.repo.rpmsave + if [[ "$Server_OS_Version" = "9" ]]; then + grep "Red Hat Enterprise Linux" /etc/os-release >/dev/null + if [[ $? ]] ; then + subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms + yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + Check_Return "yum repo" "no_exit" + else + yum config-manager --set-enabled crb > /dev/null 2>&1 + yum install -y epel-release epel-next-release + Check_Return "yum repo" "no_exit" + fi + fi + if [[ "$Server_OS_Version" = "8" ]]; then rpm --import https://cyberpanel.sh/www.centos.org/keys/RPM-GPG-KEY-CentOS-Official rpm --import https://cyberpanel.sh/dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 From f41e508227f64ad165a44414058ca4910008b34c Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 10:54:59 +0100 Subject: [PATCH 03/16] Update install.sh with CentOS 9 support --- install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 426e97cc9..aebb53e97 100644 --- a/install.sh +++ b/install.sh @@ -11,6 +11,15 @@ elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then SERVER_OS="CentOS8" yum install curl wget -y 1> /dev/null yum update curl wget ca-certificates -y 1> /dev/null +elif echo $OUTPUT | grep -q "CentOS Stream" ; then + echo -e "\nDetecting CentOS Stream...\n" + SERVER_OS="CentOS9" +yum update curl wget ca-certificates -y 1> /dev/null +elif echo $OUTPUT | grep -q "Red Hat Enterprise Linux" ; then + echo -e "\nDetecting Red Hat Enterprise Linux...\n" + SERVER_OS="RHEL" + yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then echo -e "\nDetecting AlmaLinux 8...\n" SERVER_OS="CentOS8" @@ -56,4 +65,4 @@ rm -f cyberpanel.sh rm -f install.tar.gz curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null chmod +x cyberpanel.sh -./cyberpanel.sh $@ \ No newline at end of file +./cyberpanel.sh $@ From 083d37c447be3e81b1b6663ea36991d918dae742 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 11:17:56 +0100 Subject: [PATCH 04/16] Update install.sh --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index aebb53e97..c3f6420dd 100644 --- a/install.sh +++ b/install.sh @@ -14,11 +14,12 @@ yum update curl wget ca-certificates -y 1> /dev/null elif echo $OUTPUT | grep -q "CentOS Stream" ; then echo -e "\nDetecting CentOS Stream...\n" SERVER_OS="CentOS9" +yum install wget -y 1> /dev/null yum update curl wget ca-certificates -y 1> /dev/null elif echo $OUTPUT | grep -q "Red Hat Enterprise Linux" ; then echo -e "\nDetecting Red Hat Enterprise Linux...\n" SERVER_OS="RHEL" - yum install curl wget -y 1> /dev/null + yum install wget -y 1> /dev/null yum update curl wget ca-certificates -y 1> /dev/null elif echo $OUTPUT | grep -q "AlmaLinux 8" ; then echo -e "\nDetecting AlmaLinux 8...\n" From f3c5eacd832668571674cea44e9f8b3bb14da546 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 11:27:01 +0100 Subject: [PATCH 05/16] Update cyberpanel.sh --- cyberpanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 1448282bc..2e5ad0021 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -834,7 +834,7 @@ if [[ $Server_OS = "CentOS" ]] ; then rm -f /etc/yum.repos.d/epel.repo.rpmsave if [[ "$Server_OS_Version" = "9" ]]; then - grep "Red Hat Enterprise Linux" /etc/os-release >/dev/null + grep 'NAME="Red Hat Enterprise Linux"' /etc/os-release >/dev/null if [[ $? ]] ; then subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm From 14e4da8ae3c2644cf2ad5b64efa1d2ee9b3c1988 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 11:30:19 +0100 Subject: [PATCH 06/16] Update cyberpanel.sh --- cyberpanel.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 2e5ad0021..de9c7f191 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -834,10 +834,10 @@ if [[ $Server_OS = "CentOS" ]] ; then rm -f /etc/yum.repos.d/epel.repo.rpmsave if [[ "$Server_OS_Version" = "9" ]]; then - grep 'NAME="Red Hat Enterprise Linux"' /etc/os-release >/dev/null + grep "NAME.*Red Hat Enterprise Linux" /etc/os-release >/dev/null if [[ $? ]] ; then subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms - yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm Check_Return "yum repo" "no_exit" else yum config-manager --set-enabled crb > /dev/null 2>&1 From ca555b9db86862212a8afa3df2140b3288d055ec Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 12:37:18 +0100 Subject: [PATCH 07/16] Update cyberpanel.sh --- cyberpanel.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index de9c7f191..821af74ae 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -834,16 +834,9 @@ if [[ $Server_OS = "CentOS" ]] ; then rm -f /etc/yum.repos.d/epel.repo.rpmsave if [[ "$Server_OS_Version" = "9" ]]; then - grep "NAME.*Red Hat Enterprise Linux" /etc/os-release >/dev/null - if [[ $? ]] ; then - subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm - Check_Return "yum repo" "no_exit" - else - yum config-manager --set-enabled crb > /dev/null 2>&1 - yum install -y epel-release epel-next-release - Check_Return "yum repo" "no_exit" - fi + subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms || yum config-manager --set-enabled crb > /dev/null 2>&1 + yum install -y https://cyberpanel.sh/dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + Check_Return "yum repo" "no_exit" fi if [[ "$Server_OS_Version" = "8" ]]; then @@ -1022,6 +1015,11 @@ if [[ "$Server_OS" = "CentOS" ]] || [[ "$Server_OS" = "openEuler" ]] ; then Check_Return dnf install -y gpgme-devel Check_Return + elif [[ "$Server_OS_Version" = "9" ]] ; then + dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git platform-python-devel tar socat python3 zip unzip bind-utils + Check_Return + dnf install -y gpgme-devel + Check_Return elif [[ "$Server_OS_Version" = "20" ]] || [[ "$Server_OS_Version" = "22" ]] ; then dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git python3-devel tar socat python3 zip unzip bind-utils Check_Return @@ -1351,6 +1349,11 @@ if [[ "$Server_OS" = "CentOS" ]] ; then #get this set up beforehand. fi + if [[ "$Server_OS_Version" = "9" ]] ; then + sed -i 's|rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://rpms.litespeedtech.com/centos/litespeed.repo|g' install.py + sed -i "s|mirrorlist=http://mirrorlist.ghettoforge.org/el/8/gf/\$basearch/mirrorlist|baseurl=https://cyberpanel.sh/mirror.ghettoforge.org/distributions/gf/el/9/gf/x86_64/|g" /etc/yum.repos.d/gf.repo + sed -i "s|mirrorlist=http://mirrorlist.ghettoforge.org/el/8/plus/\$basearch/mirrorlist|baseurl=https://cyberpanel.sh/mirror.ghettoforge.org/distributions/gf/el/9/plus/x86_64/|g" /etc/yum.repos.d/gf.repo + fi fi sed -i "s|https://www.litespeedtech.com/|https://cyberpanel.sh/www.litespeedtech.com/|g" installCyberPanel.py @@ -1549,7 +1552,7 @@ fi Post_Install_Addon_Redis() { if [[ "$Server_OS" = "CentOS" ]]; then - if [[ "$Server_OS_Version" = "8" ]]; then + if [[ "$Server_OS_Version" = "8" || "$Server_OS_Version" = "9" ]]; then yum install -y lsphp??-redis redis else yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm From ef920845b81fc1434ab618c26b49d7d5679df745 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 12:51:17 +0100 Subject: [PATCH 08/16] Update cyberpanel.sh --- cyberpanel.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cyberpanel.sh b/cyberpanel.sh index 821af74ae..ed87bfda9 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -837,6 +837,8 @@ if [[ $Server_OS = "CentOS" ]] ; then subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms || yum config-manager --set-enabled crb > /dev/null 2>&1 yum install -y https://cyberpanel.sh/dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm Check_Return "yum repo" "no_exit" + yum install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm + Check_Return "yum repo" "no_exit" fi if [[ "$Server_OS_Version" = "8" ]]; then From fd5ffe5a95cb22ed23d39096717b4a7c3ae0b1c4 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 13:48:29 +0100 Subject: [PATCH 09/16] Update cyberpanel.sh --- cyberpanel.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cyberpanel.sh b/cyberpanel.sh index ed87bfda9..8fd094876 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -839,6 +839,16 @@ if [[ $Server_OS = "CentOS" ]] ; then Check_Return "yum repo" "no_exit" yum install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm Check_Return "yum repo" "no_exit" + cat </etc/yum.repos.d/MariaDB.repo +# MariaDB 10.4 CentOS repository list - created 2021-08-06 02:01 UTC +# http://downloads.mariadb.org/mariadb/repositories/ +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.11/rhel9-amd64/ +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +enabled=1 +gpgcheck=1 +EOF fi if [[ "$Server_OS_Version" = "8" ]]; then From a4c7569dc5485f34578547f9dbafd80cb8970bd2 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Tue, 21 Nov 2023 14:24:14 +0100 Subject: [PATCH 10/16] Update cyberpanel.sh --- cyberpanel.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 8fd094876..dee4ec7fb 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1028,9 +1028,7 @@ if [[ "$Server_OS" = "CentOS" ]] || [[ "$Server_OS" = "openEuler" ]] ; then dnf install -y gpgme-devel Check_Return elif [[ "$Server_OS_Version" = "9" ]] ; then - dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git platform-python-devel tar socat python3 zip unzip bind-utils - Check_Return - dnf install -y gpgme-devel + dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel MariaDB-server MariaDB-client MariaDB-devel curl-devel git platform-python-devel tar socat python3 zip unzip bind-utils gpgme-devel Check_Return elif [[ "$Server_OS_Version" = "20" ]] || [[ "$Server_OS_Version" = "22" ]] ; then dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git python3-devel tar socat python3 zip unzip bind-utils From f452bab0d97f3765133e9b9e15700c9093ec894a Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 22 Nov 2023 17:41:52 +0100 Subject: [PATCH 11/16] Update cyberpanel_utility.sh --- cyberpanel_utility.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cyberpanel_utility.sh b/cyberpanel_utility.sh index 46a67c0ab..2aa90e9ca 100644 --- a/cyberpanel_utility.sh +++ b/cyberpanel_utility.sh @@ -15,6 +15,10 @@ check_OS() { if grep -q -E "CentOS Linux 7|CentOS Linux 8" /etc/os-release ; then Server_OS="CentOS" + elif grep -q "CentOS Stream" /etc/os-release ; then + Server_OS="CentOS" + elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then + Server_OS="CentOS" elif grep -q "AlmaLinux-8" /etc/os-release ; then Server_OS="AlmaLinux" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then From 9837bdf1dcc856f29514a5bc2d6e61520b1e18e9 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 22 Nov 2023 17:43:23 +0100 Subject: [PATCH 12/16] Update cyberpanel_utility.sh --- cyberpanel_utility.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cyberpanel_utility.sh b/cyberpanel_utility.sh index 2aa90e9ca..92f941f86 100644 --- a/cyberpanel_utility.sh +++ b/cyberpanel_utility.sh @@ -13,12 +13,10 @@ check_OS() { exit fi - if grep -q -E "CentOS Linux 7|CentOS Linux 8" /etc/os-release ; then - Server_OS="CentOS" - elif grep -q "CentOS Stream" /etc/os-release ; then - Server_OS="CentOS" - elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then - Server_OS="CentOS" + if grep -q -E "CentOS Linux 7|CentOS Linux 8|CentOS Stream" /etc/os-release ; then + Server_OS="CentOS" + elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then + Server_OS="RedHat" elif grep -q "AlmaLinux-8" /etc/os-release ; then Server_OS="AlmaLinux" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then From 3fad19953f76bb959ddfe8856639913124eb8635 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 22 Nov 2023 17:44:02 +0100 Subject: [PATCH 13/16] Update cyberpanel_upgrade.sh --- cyberpanel_upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 7aba557bb..64a5b0778 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -113,7 +113,9 @@ if ! uname -m | grep -qE 'x86_64|aarch64' ; then exit fi -if grep -q -E "CentOS Linux 7|CentOS Linux 8" /etc/os-release ; then +if grep -q -E "CentOS Linux 7|CentOS Linux 8|CentOS Stream" /etc/os-release ; then + Server_OS="CentOS" +elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then Server_OS="CentOS" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then Server_OS="CloudLinux" From c6b0d08b11ceac38e622ce502a707d38a0ea1cc5 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 22 Nov 2023 17:44:24 +0100 Subject: [PATCH 14/16] Update cyberpanel_utility.sh --- cyberpanel_utility.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel_utility.sh b/cyberpanel_utility.sh index 92f941f86..7dc554a61 100644 --- a/cyberpanel_utility.sh +++ b/cyberpanel_utility.sh @@ -16,7 +16,7 @@ check_OS() { if grep -q -E "CentOS Linux 7|CentOS Linux 8|CentOS Stream" /etc/os-release ; then Server_OS="CentOS" elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then - Server_OS="RedHat" + Server_OS="CentOS" elif grep -q "AlmaLinux-8" /etc/os-release ; then Server_OS="AlmaLinux" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then From 0024f942bfa3d5c5bc78e79edc9fdea6efcd51f3 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 22 Nov 2023 17:45:25 +0100 Subject: [PATCH 15/16] Update cyberpanel_upgrade.sh --- cyberpanel_upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 64a5b0778..ae2720ae1 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -116,7 +116,7 @@ fi if grep -q -E "CentOS Linux 7|CentOS Linux 8|CentOS Stream" /etc/os-release ; then Server_OS="CentOS" elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then - Server_OS="CentOS" + Server_OS="RedHat" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then Server_OS="CloudLinux" elif grep -q -E "Rocky Linux" /etc/os-release ; then @@ -139,7 +139,7 @@ Server_OS_Version=$(grep VERSION_ID /etc/os-release | awk -F[=,] '{print $2}' | echo -e "System: $Server_OS $Server_OS_Version detected...\n" -if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] ; then +if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] || [[ "$Server_OS" = "RedHat" ]]; then Server_OS="CentOS" #CloudLinux gives version id like 7.8, 7.9, so cut it to show first number only #treat CloudLinux, Rocky and Alma as CentOS From d7466f39c9872e0b7fec33a455e20cd0d7d44ac8 Mon Sep 17 00:00:00 2001 From: Gergely Lonyai Date: Wed, 22 Nov 2023 17:45:48 +0100 Subject: [PATCH 16/16] Update cyberpanel_utility.sh --- cyberpanel_utility.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cyberpanel_utility.sh b/cyberpanel_utility.sh index 7dc554a61..5b41a2001 100644 --- a/cyberpanel_utility.sh +++ b/cyberpanel_utility.sh @@ -16,7 +16,7 @@ check_OS() { if grep -q -E "CentOS Linux 7|CentOS Linux 8|CentOS Stream" /etc/os-release ; then Server_OS="CentOS" elif grep -q "Red Hat Enterprise Linux" /etc/os-release ; then - Server_OS="CentOS" + Server_OS="RedHat" elif grep -q "AlmaLinux-8" /etc/os-release ; then Server_OS="AlmaLinux" elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then @@ -38,7 +38,7 @@ check_OS() { echo -e "System: $Server_OS $Server_OS_Version detected...\n" - if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] ; then + if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] || [[ "$Server_OS" = "RedHat" ]]; then Server_OS="CentOS" #CloudLinux gives version id like 7.8, 7.9, so cut it to show first number only #treat CloudLinux, Rocky and Alma as CentOS