Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

powertools for other centos 8 variants #808

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions cyberpanel_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,18 +392,25 @@ EOF

#all pre-upgrade operation for CentOS 7
elif [[ "$Server_OS_Version" = "8" ]] ; then
cat <<EOF >/etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo
[powertools-for-cyberpanel]
name=CentOS Linux \$releasever - PowerTools
mirrorlist=http://mirrorlist.centos.org/?release=\$releasever&arch=\$basearch&repo=PowerTools&infra=\$infra
baseurl=http://mirror.centos.org/\$contentdir/\$releasever/PowerTools/\$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
EOF
rm -f /etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo
dnf config-manager --set-enabled PowerTools > /dev/null 2>&1
dnf config-manager --set-enabled powertools > /dev/null 2>&1
# cat <<EOF >/etc/yum.repos.d/CentOS-PowerTools-CyberPanel.repo
#[powertools-for-cyberpanel]
#name=CentOS Linux \$releasever - PowerTools
#mirrorlist=http://mirrorlist.centos.org/?release=\$releasever&arch=\$basearch&repo=PowerTools&infra=\$infra
#baseurl=http://mirror.centos.org/\$contentdir/\$releasever/PowerTools/\$basearch/os/
#gpgcheck=1
#enabled=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#EOF

if [[ "$Server_Country" = "CN" ]] ; then
dnf --nogpg install -y https://cyberpanel.sh/mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el8.noarch.rpm
sed -i 's|# baseurl=https://repo.almalinux.org|baseurl=https://cyberpanel.sh/repo.almalinux.org|g' /etc/yum.repos.d/almalinux-powertools.repo
sed -i 's|mirrorlist=|# mirrorlist=|g' /etc/yum.repos.d/almalinux-powertools.repo
sed -i 's|#baseurl=http://dl.rockylinux.org|baseurl=https://cyberpanel.sh/dl.rockylinux.org|g' /etc/yum.repos.d/Rocky-PowerTools.repo
sed -i 's|mirrorlist=|# mirrorlist=|g' /etc/yum.repos.d/Rocky-PowerTools.repo
else
dnf --nogpg install -y https://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el8.noarch.rpm
fi
Expand Down