Update cyberpanel.sh with CentOS 9 support

This commit is contained in:
Gergely Lonyai
2023-11-21 10:46:24 +01:00
committed by GitHub
parent 416e8a4cc1
commit 6320a78305

View File

@@ -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