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:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-07-19 14:36:55 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-07-19 14:36:55 +0300
commit0dd0ba717fe88814ce2053c8b6019278fde4bed5 (patch)
tree93eec9b6551a649516eea52d93a9ddc19adb0446
parent8050330e2e997ac7d0da54d3d18edc3e63392ad3 (diff)
fail2ban status + apt-get purge
-rw-r--r--x-ui.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/x-ui.sh b/x-ui.sh
index c2b6f5ff..bb2064ac 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -772,7 +772,8 @@ iplimit_main() {
echo -e "${green}\t2.${plain} Change Ban Duration"
echo -e "${green}\t3.${plain} Unban Everyone"
echo -e "${green}\t4.${plain} Check Logs"
- echo -e "${green}\t5.${plain} Uninstall IP Limit"
+ echo -e "${green}\t5.${plain} fail2ban status"
+ echo -e "${green}\t6.${plain} Uninstall IP Limit"
echo -e "${green}\t0.${plain} Back to Main Menu"
read -p "Choose an option: " choice
case "$choice" in
@@ -816,6 +817,10 @@ iplimit_main() {
iplimit_main
fi ;;
5)
+ service fail2ban status
+ ;;
+
+ 6)
remove_iplimit ;;
*) echo "Invalid choice" ;;
esac
@@ -886,23 +891,19 @@ remove_iplimit(){
echo -e "${green}IP Limit removed successfully!${plain}\n"
before_show_menu ;;
2)
- rm -f /etc/fail2ban/filter.d/3x-ipl.conf
- rm -f /etc/fail2ban/action.d/3x-ipl.conf
- rm -f /etc/fail2ban/jail.d/3x-ipl.conf
+ rm -rf /etc/fail2ban
systemctl stop fail2ban
- systemctl disable fail2ban
case "${release}" in
ubuntu|debian)
- apt remove fail2ban -y ;;
+ apt-get purge fail2ban -y;;
centos)
- yum -y remove fail2ban ;;
+ yum remove fail2ban -y;;
fedora)
- dnf -y remove fail2ban ;;
+ dnf remove fail2ban -y;;
*)
echo -e "${red}Unsupported operating system. Please uninstall Fail2ban manually.${plain}\n"
exit 1 ;;
esac
- rm -rf /etc/fail2ban
echo -e "${green}Fail2ban and IP Limit removed successfully!${plain}\n"
before_show_menu ;;
0)