mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-13 13:57:59 +00:00
Update for Red Hat base Linux (#3589)
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
* Update install.sh * Update update.sh * Update x-ui.sh * Update install.sh * Update update.sh * Update x-ui.sh * fix
This commit is contained in:
parent
83a1c721c7
commit
e8c509c720
3 changed files with 271 additions and 247 deletions
16
install.sh
16
install.sh
|
|
@ -15,7 +15,7 @@ cur_dir=$(pwd)
|
||||||
if [[ -f /etc/os-release ]]; then
|
if [[ -f /etc/os-release ]]; then
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
release=$ID
|
release=$ID
|
||||||
elif [[ -f /usr/lib/os-release ]]; then
|
elif [[ -f /usr/lib/os-release ]]; then
|
||||||
source /usr/lib/os-release
|
source /usr/lib/os-release
|
||||||
release=$ID
|
release=$ID
|
||||||
else
|
else
|
||||||
|
|
@ -44,12 +44,16 @@ install_base() {
|
||||||
ubuntu | debian | armbian)
|
ubuntu | debian | armbian)
|
||||||
apt-get update && apt-get install -y -q wget curl tar tzdata
|
apt-get update && apt-get install -y -q wget curl tar tzdata
|
||||||
;;
|
;;
|
||||||
centos | rhel | almalinux | rocky | ol)
|
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||||
yum -y update && yum install -y -q wget curl tar tzdata
|
|
||||||
;;
|
|
||||||
fedora | amzn | virtuozzo)
|
|
||||||
dnf -y update && dnf install -y -q wget curl tar tzdata
|
dnf -y update && dnf install -y -q wget curl tar tzdata
|
||||||
;;
|
;;
|
||||||
|
centos)
|
||||||
|
if [[ "${VERSION_ID}" =~ ^7 ]]; then
|
||||||
|
yum -y update && yum install -y wget curl tar tzdata
|
||||||
|
else
|
||||||
|
dnf -y update && dnf install -y -q wget curl tar tzdata
|
||||||
|
fi
|
||||||
|
;;
|
||||||
arch | manjaro | parch)
|
arch | manjaro | parch)
|
||||||
pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata
|
pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata
|
||||||
;;
|
;;
|
||||||
|
|
@ -251,7 +255,7 @@ install_x-ui() {
|
||||||
│ ${blue}x-ui legacy${plain} - Legacy version │
|
│ ${blue}x-ui legacy${plain} - Legacy version │
|
||||||
│ ${blue}x-ui install${plain} - Install │
|
│ ${blue}x-ui install${plain} - Install │
|
||||||
│ ${blue}x-ui uninstall${plain} - Uninstall │
|
│ ${blue}x-ui uninstall${plain} - Uninstall │
|
||||||
└───────────────────────────────────────────────────────┘"
|
└───────────────────────────────────────────────────────┘"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -e "${green}Running...${plain}"
|
echo -e "${green}Running...${plain}"
|
||||||
|
|
|
||||||
16
update.sh
16
update.sh
|
|
@ -47,7 +47,7 @@ fi
|
||||||
if [[ -f /etc/os-release ]]; then
|
if [[ -f /etc/os-release ]]; then
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
release=$ID
|
release=$ID
|
||||||
elif [[ -f /usr/lib/os-release ]]; then
|
elif [[ -f /usr/lib/os-release ]]; then
|
||||||
source /usr/lib/os-release
|
source /usr/lib/os-release
|
||||||
release=$ID
|
release=$ID
|
||||||
else
|
else
|
||||||
|
|
@ -76,12 +76,16 @@ install_base() {
|
||||||
ubuntu | debian | armbian)
|
ubuntu | debian | armbian)
|
||||||
apt-get update >/dev/null 2>&1 && apt-get install -y -q wget curl tar tzdata >/dev/null 2>&1
|
apt-get update >/dev/null 2>&1 && apt-get install -y -q wget curl tar tzdata >/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
centos | rhel | almalinux | rocky | ol)
|
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||||
yum -y update >/dev/null 2>&1 && yum install -y -q wget curl tar tzdata >/dev/null 2>&1
|
|
||||||
;;
|
|
||||||
fedora | amzn | virtuozzo)
|
|
||||||
dnf -y update >/dev/null 2>&1 && dnf install -y -q wget curl tar tzdata >/dev/null 2>&1
|
dnf -y update >/dev/null 2>&1 && dnf install -y -q wget curl tar tzdata >/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
|
centos)
|
||||||
|
if [[ "${VERSION_ID}" =~ ^7 ]]; then
|
||||||
|
yum -y update >/dev/null 2>&1 && yum install -y -q wget curl tar tzdata >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
dnf -y update >/dev/null 2>&1 && dnf install -y -q wget curl tar tzdata >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
arch | manjaro | parch)
|
arch | manjaro | parch)
|
||||||
pacman -Syu >/dev/null 2>&1 && pacman -Syu --noconfirm wget curl tar tzdata >/dev/null 2>&1
|
pacman -Syu >/dev/null 2>&1 && pacman -Syu --noconfirm wget curl tar tzdata >/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
|
|
@ -250,7 +254,7 @@ update_x-ui() {
|
||||||
│ ${blue}x-ui legacy${plain} - Legacy version │
|
│ ${blue}x-ui legacy${plain} - Legacy version │
|
||||||
│ ${blue}x-ui install${plain} - Install │
|
│ ${blue}x-ui install${plain} - Install │
|
||||||
│ ${blue}x-ui uninstall${plain} - Uninstall │
|
│ ${blue}x-ui uninstall${plain} - Uninstall │
|
||||||
└───────────────────────────────────────────────────────┘"
|
└───────────────────────────────────────────────────────┘"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -e "${green}Running...${plain}"
|
echo -e "${green}Running...${plain}"
|
||||||
|
|
|
||||||
48
x-ui.sh
48
x-ui.sh
|
|
@ -509,12 +509,16 @@ enable_bbr() {
|
||||||
ubuntu | debian | armbian)
|
ubuntu | debian | armbian)
|
||||||
apt-get update && apt-get install -yqq --no-install-recommends ca-certificates
|
apt-get update && apt-get install -yqq --no-install-recommends ca-certificates
|
||||||
;;
|
;;
|
||||||
centos | rhel | almalinux | rocky | ol)
|
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||||
yum -y update && yum -y install ca-certificates
|
|
||||||
;;
|
|
||||||
fedora | amzn | virtuozzo)
|
|
||||||
dnf -y update && dnf -y install ca-certificates
|
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)
|
arch | manjaro | parch)
|
||||||
pacman -Sy --noconfirm ca-certificates
|
pacman -Sy --noconfirm ca-certificates
|
||||||
;;
|
;;
|
||||||
|
|
@ -1073,12 +1077,15 @@ ssl_cert_issue() {
|
||||||
ubuntu | debian | armbian)
|
ubuntu | debian | armbian)
|
||||||
apt-get update && apt-get install socat -y
|
apt-get update && apt-get install socat -y
|
||||||
;;
|
;;
|
||||||
centos | rhel | almalinux | rocky | ol)
|
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||||
yum -y update && yum -y install socat
|
|
||||||
;;
|
|
||||||
fedora | amzn | virtuozzo)
|
|
||||||
dnf -y update && dnf -y install socat
|
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)
|
arch | manjaro | parch)
|
||||||
pacman -Sy --noconfirm socat
|
pacman -Sy --noconfirm socat
|
||||||
;;
|
;;
|
||||||
|
|
@ -1537,12 +1544,16 @@ install_iplimit() {
|
||||||
armbian)
|
armbian)
|
||||||
apt-get update && apt-get install fail2ban -y
|
apt-get update && apt-get install fail2ban -y
|
||||||
;;
|
;;
|
||||||
centos | rhel | almalinux | rocky | ol)
|
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 update -y && yum install epel-release -y
|
||||||
yum -y install fail2ban
|
yum -y install fail2ban
|
||||||
;;
|
else
|
||||||
fedora | amzn | virtuozzo)
|
|
||||||
dnf -y update && dnf -y install fail2ban
|
dnf -y update && dnf -y install fail2ban
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
arch | manjaro | parch)
|
arch | manjaro | parch)
|
||||||
pacman -Syu --noconfirm fail2ban
|
pacman -Syu --noconfirm fail2ban
|
||||||
|
|
@ -1637,14 +1648,19 @@ remove_iplimit() {
|
||||||
apt-get purge -y fail2ban -y
|
apt-get purge -y fail2ban -y
|
||||||
apt-get autoremove -y
|
apt-get autoremove -y
|
||||||
;;
|
;;
|
||||||
centos | rhel | almalinux | rocky | ol)
|
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||||
yum remove fail2ban -y
|
|
||||||
yum autoremove -y
|
|
||||||
;;
|
|
||||||
fedora | amzn | virtuozzo)
|
|
||||||
dnf remove fail2ban -y
|
dnf remove fail2ban -y
|
||||||
dnf autoremove -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)
|
arch | manjaro | parch)
|
||||||
pacman -Rns --noconfirm fail2ban
|
pacman -Rns --noconfirm fail2ban
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue