Forgot to uodate remove_iplimit x-ui.sh

This commit is contained in:
somebodywashere 2023-06-20 11:52:58 +00:00
parent d000323394
commit a046e9a97f

View file

@ -689,7 +689,7 @@ iplimit_main() {
iplimit_main iplimit_main
fi ;; fi ;;
2) 2)
read -rp "Please enter new Ban duration in minutes [default is 5]: " NUM read -rp "Please enter new Ban Duration in Minutes [default 5]: " NUM
if [[ $NUM =~ ^[0-9]+$ ]]; then if [[ $NUM =~ ^[0-9]+$ ]]; then
echo -e "\n[3x-ipl]\nenabled=true\nfilter=3x-ipl\naction=3x-ipl\nlogpath=/var/log/3xipl.log\nmaxretry=3\nfindtime=100\nbantime=${NUM}m" > /etc/fail2ban/jail.d/3x-ipl.conf echo -e "\n[3x-ipl]\nenabled=true\nfilter=3x-ipl\naction=3x-ipl\nlogpath=/var/log/3xipl.log\nmaxretry=3\nfindtime=100\nbantime=${NUM}m" > /etc/fail2ban/jail.d/3x-ipl.conf
echo -e "${green}Bantime set to ${NUM} minutes successfully." echo -e "${green}Bantime set to ${NUM} minutes successfully."
@ -799,17 +799,14 @@ remove_iplimit(){
1) 1)
rm -f /etc/fail2ban/filter.d/3x-ipl.conf rm -f /etc/fail2ban/filter.d/3x-ipl.conf
rm -f /etc/fail2ban/action.d/3x-ipl.conf rm -f /etc/fail2ban/action.d/3x-ipl.conf
if test -f "/etc/fail2ban/jail.conf"; then rm -f /etc/fail2ban/jail.d/3x-ipl.conf
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
else
echo -e "${red}File /etc/fail2ban/jail.conf not found! Please remove [3x-ipl] jail manually from /etc/fail2ban/jail.local.${plain}\n"
fi
sudo systemctl restart fail2ban sudo systemctl restart fail2ban
echo -e "${green}IP Limit removed successfully!${plain}\n" echo -e "${green}IP Limit removed successfully!${plain}\n"
before_show_menu ;; before_show_menu ;;
2) 2)
rm -f /etc/fail2ban/filter.d/3x-ipl.conf rm -f /etc/fail2ban/filter.d/3x-ipl.conf
rm -f /etc/fail2ban/action.d/3x-ipl.conf rm -f /etc/fail2ban/action.d/3x-ipl.conf
rm -f /etc/fail2ban/jail.d/3x-ipl.conf
sudo systemctl stop fail2ban sudo systemctl stop fail2ban
sudo systemctl disable fail2ban sudo systemctl disable fail2ban
case "${release}" in case "${release}" in