From 98cada3771a7f552e65c502d2d492cc7520a18bb Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sat, 7 Sep 2024 15:14:52 +0500 Subject: [PATCH] arm bug fix for mariadb --- cyberpanel.sh | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 22bbde814..3a44a58a7 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -853,16 +853,26 @@ 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 + #!/bin/bash + +# Check if architecture is x86_64 +if uname -m | grep -q 'x86_64' ; then + # Create the MariaDB repository configuration file for x86_64 architecture + cat </etc/yum.repos.d/MariaDB.repo +# MariaDB 10.11 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 + echo "MariaDB repository file created for x86_64 architecture." +else + echo "This script only runs on x86_64 systems." + exit 1 +fi fi if [[ "$Server_OS_Version" = "8" ]]; then