diff --git a/cyberpanel.sh b/cyberpanel.sh index 3a3e2cbe4..38f0d4657 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -864,14 +864,6 @@ EOF dnf config-manager --set-enabled PowerTools > /dev/null 2>&1 dnf config-manager --set-enabled powertools > /dev/null 2>&1 - cat </etc/yum.repos.d/MariaDB.repo -[mariadb] -name = MariaDB -baseurl = https://rpm.mariadb.org/10.6/rhel/\$releasever/\$basearch -gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB -gpgcheck=1 -EOF - # cat </etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo #[powertools-for-cyberpanel] diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 9643ea94f..361101d85 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -44,6 +44,8 @@ def FetchCloudLinuxVersion(): return 89 elif (data.find('CloudLinux') > -1 or data.find('cloudlinux') > -1) and (data.find('8.8') > -1 or data.find('Anatoly Filipchenko') > -1): return 88 + elif (data.find('AlmaLinux') > -1 or data.find('almalinux') > -1) and (data.find('8.7') > -1 or data.find('Stone Smilodon') > -1): + return 87 else: return -1 @@ -367,6 +369,18 @@ def installMySQL(self, mysql): baseurl = https://rpm.mariadb.org/10.6/rhel/$releasever/$basearch gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 +''' + WriteToFile = open(repo, 'w') + WriteToFile.write(repoContent) + WriteToFile.close() + elif FetchCloudLinuxVersion() >= 87: + repo = '/etc/yum.repos.d/mariadb.repo' + repoContent = ''' +[mariadb] +name = MariaDB +baseurl = https://rpm.mariadb.org/10.6/rhel/$releasever/$basearch +gpgkey= https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 ''' WriteToFile = open(repo, 'w') WriteToFile.write(repoContent)