Skip to content

Commit

Permalink
(fixed) fail2ban - ubuntu 24
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Jun 4, 2024
1 parent fdf805f commit 7ac7944
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ config_after_install() {
echo -e "${yellow}Your password will be: ${config_password}${plain}"
read -p "Please set up the panel port: " config_port
echo -e "${yellow}Your panel port is: ${config_port}${plain}"
read -p "Please set up the web base path: " config_webBasePath
read -p "Please set up the web base path (ip:port/webbasepath/): " config_webBasePath
echo -e "${yellow}Your web base path is: ${config_webBasePath}${plain}"
echo -e "${yellow}Initializing, please wait...${plain}"
/usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password}
Expand Down
13 changes: 10 additions & 3 deletions x-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,14 @@ install_iplimit() {

# Check the OS and install necessary packages
case "${release}" in
ubuntu | debian | armbian)
ubuntu)
if [[ "${os_version}" -ge 24 ]]; then
apt update && apt install python3-pip -y
python3 -m pip install pyasynchat --break-system-packages
fi
apt update && apt install fail2ban -y
;;
debian | armbian)
apt update && apt install fail2ban -y
;;
centos | almalinux | rocky | oracle)
Expand All @@ -1137,8 +1144,8 @@ install_iplimit() {
dnf -y update && dnf -y install fail2ban
;;
arch | manjaro | parch)
pacman -Syu --noconfirm fail2ban
;;
pacman -Syu --noconfirm fail2ban
;;
*)
echo -e "${red}Unsupported operating system. Please check the script and install the necessary packages manually.${plain}\n"
exit 1
Expand Down

0 comments on commit 7ac7944

Please sign in to comment.