fix(scripts): avoid rpm package upgrades before installs (#5750)

This commit is contained in:
Vitaliy Pavlov 2026-07-03 02:01:54 +04:00 committed by GitHub
parent 1afab47f04
commit ed95acdd47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 13 deletions

View file

@ -101,13 +101,13 @@ install_base() {
apt-get update && apt-get install -y -q cron curl tar tzdata socat ca-certificates openssl
;;
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update && dnf install -y -q cronie curl tar tzdata socat ca-certificates openssl
dnf makecache -y && dnf install -y -q cronie curl tar tzdata socat ca-certificates openssl
;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update && yum install -y cronie curl tar tzdata socat ca-certificates openssl
yum makecache -y && yum install -y cronie curl tar tzdata socat ca-certificates openssl
else
dnf -y update && dnf install -y -q cronie curl tar tzdata socat ca-certificates openssl
dnf makecache -y && dnf install -y -q cronie curl tar tzdata socat ca-certificates openssl
fi
;;
arch | manjaro | parch)

View file

@ -187,7 +187,7 @@ install_base() {
;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update > /dev/null 2>&1 && yum install -y -q cronie curl tar tzdata socat openssl > /dev/null 2>&1
yum makecache -y > /dev/null 2>&1 && yum install -y -q cronie curl tar tzdata socat openssl > /dev/null 2>&1
else
dnf makecache -y > /dev/null 2>&1 && dnf install -y -q cronie curl tar tzdata socat openssl > /dev/null 2>&1
fi

18
x-ui.sh
View file

@ -1583,13 +1583,13 @@ ssl_cert_issue_for_ip() {
apt-get update > /dev/null 2>&1 && apt-get install socat -y > /dev/null 2>&1
;;
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
dnf makecache -y > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update > /dev/null 2>&1 && yum -y install socat > /dev/null 2>&1
yum makecache -y > /dev/null 2>&1 && yum -y install socat > /dev/null 2>&1
else
dnf -y update > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
dnf makecache -y > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
fi
;;
arch | manjaro | parch)
@ -1749,13 +1749,13 @@ ssl_cert_issue() {
apt-get update > /dev/null 2>&1 && apt-get install socat -y > /dev/null 2>&1
;;
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
dnf makecache -y > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update > /dev/null 2>&1 && yum -y install socat > /dev/null 2>&1
yum makecache -y > /dev/null 2>&1 && yum -y install socat > /dev/null 2>&1
else
dnf -y update > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
dnf makecache -y > /dev/null 2>&1 && dnf -y install socat > /dev/null 2>&1
fi
;;
arch | manjaro | parch)
@ -2286,14 +2286,14 @@ setup_fail2ban_iplimit() {
apt-get update && apt-get install fail2ban nftables -y
;;
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update && dnf -y install fail2ban nftables
dnf makecache -y && dnf -y install fail2ban nftables
;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum update -y && yum install epel-release -y
yum makecache -y && yum install epel-release -y
yum -y install fail2ban nftables
else
dnf -y update && dnf -y install fail2ban nftables
dnf makecache -y && dnf -y install fail2ban nftables
fi
;;
arch | manjaro | parch)