update fail2ban v1.0.2 for debian

This commit is contained in:
MHSanaei
2024-01-20 16:38:54 +03:30
parent 7f13adbd05
commit 38378fe36f
2 changed files with 29 additions and 20 deletions

View File

@@ -81,19 +81,21 @@ fi
install_base() {
case "${release}" in
centos|fedora|almalinux|rocky)
yum -y update && yum install -y -q wget curl tar
;;
arch|manjaro)
pacman -Syu && pacman -Syu --noconfirm wget curl tar
;;
*)
apt-get update && apt install -y -q wget curl tar
;;
centos | almalinux | rocky)
yum -y update && yum install -y -q wget curl tar
;;
fedora)
dnf -y update && dnf install -y -q wget curl tar
;;
arch | manjaro)
pacman -Syu && pacman -Syu --noconfirm wget curl tar
;;
*)
apt-get update && apt install -y -q wget curl tar
;;
esac
}
# This function will be called when user installed x-ui out of security
config_after_install() {
echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}"
@@ -167,11 +169,10 @@ install_x-ui() {
# Check the system's architecture and rename the file accordingly
if [[ $(arch3xui) == "armv5" || $(arch3xui) == "armv6" || $(arch3xui) == "armv7" ]]; then
mv bin/xray-linux-$(arch3xui) bin/xray-linux-arm
chmod +x bin/xray-linux-arm
mv bin/xray-linux-$(arch3xui) bin/xray-linux-arm
chmod +x bin/xray-linux-arm
fi
chmod +x x-ui bin/xray-linux-$(arch3xui)
cp -f x-ui.service /etc/systemd/system/
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
@@ -201,7 +202,6 @@ install_x-ui() {
echo -e "----------------------------------------------"
}
echo -e "${green}Running...${plain}"
install_base
install_x-ui $1