Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieXu <xujie0739@gmail.com>2025-12-03 23:40:49 +0300
committerGitHub <noreply@github.com>2025-12-03 23:40:49 +0300
commite8c509c720267f6da34b9a43104f83f3dd77ef88 (patch)
treeed183d003aad904aca48624b4efe39845c56cff0 /x-ui.sh
parent83a1c721c761b82c719a51870e78f24d50f3a028 (diff)
Update for Red Hat base Linux (#3589)
* Update install.sh * Update update.sh * Update x-ui.sh * Update install.sh * Update update.sh * Update x-ui.sh * fix
Diffstat (limited to 'x-ui.sh')
-rw-r--r--x-ui.sh52
1 files changed, 34 insertions, 18 deletions
diff --git a/x-ui.sh b/x-ui.sh
index b492998b..6169d01b 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -509,12 +509,16 @@ enable_bbr() {
ubuntu | debian | armbian)
apt-get update && apt-get install -yqq --no-install-recommends ca-certificates
;;
- centos | rhel | almalinux | rocky | ol)
- yum -y update && yum -y install ca-certificates
- ;;
- fedora | amzn | virtuozzo)
+ fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update && dnf -y install ca-certificates
;;
+ centos)
+ if [[ "${VERSION_ID}" =~ ^7 ]]; then
+ yum -y update && yum -y install ca-certificates
+ else
+ dnf -y update && dnf -y install ca-certificates
+ fi
+ ;;
arch | manjaro | parch)
pacman -Sy --noconfirm ca-certificates
;;
@@ -1073,12 +1077,15 @@ ssl_cert_issue() {
ubuntu | debian | armbian)
apt-get update && apt-get install socat -y
;;
- centos | rhel | almalinux | rocky | ol)
- yum -y update && yum -y install socat
- ;;
- fedora | amzn | virtuozzo)
+ fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update && dnf -y install socat
;;
+ centos)
+ if [[ "${VERSION_ID}" =~ ^7 ]]; then
+ yum -y update && yum -y install socat
+ else
+ dnf -y update && dnf -y install socat
+ fi
arch | manjaro | parch)
pacman -Sy --noconfirm socat
;;
@@ -1537,13 +1544,17 @@ install_iplimit() {
armbian)
apt-get update && apt-get install fail2ban -y
;;
- centos | rhel | almalinux | rocky | ol)
- yum update -y && yum install epel-release -y
- yum -y install fail2ban
- ;;
- fedora | amzn | virtuozzo)
+ fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update && dnf -y install fail2ban
;;
+ centos)
+ if [[ "${VERSION_ID}" =~ ^7 ]]; then
+ yum update -y && yum install epel-release -y
+ yum -y install fail2ban
+ else
+ dnf -y update && dnf -y install fail2ban
+ fi
+ ;;
arch | manjaro | parch)
pacman -Syu --noconfirm fail2ban
;;
@@ -1637,14 +1648,19 @@ remove_iplimit() {
apt-get purge -y fail2ban -y
apt-get autoremove -y
;;
- centos | rhel | almalinux | rocky | ol)
- yum remove fail2ban -y
- yum autoremove -y
- ;;
- fedora | amzn | virtuozzo)
+ fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf remove fail2ban -y
dnf autoremove -y
;;
+ centos)
+ if [[ "${VERSION_ID}" =~ ^7 ]]; then
+ yum remove fail2ban -y
+ yum autoremove -y
+ else
+ dnf remove fail2ban -y
+ dnf autoremove -y
+ fi
+ ;;
arch | manjaro | parch)
pacman -Rns --noconfirm fail2ban
;;