diff --git a/x-ui.sh b/x-ui.sh index 000a5f27..fc6c162e 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -507,7 +507,7 @@ run_speedtest() { # If not installed, install it local pkg_manager="" local speedtest_install_script="" - + if command -v dnf &> /dev/null; then pkg_manager="dnf" speedtest_install_script="https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh" @@ -520,8 +520,13 @@ run_speedtest() { elif command -v apt &> /dev/null; then pkg_manager="apt" speedtest_install_script="https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh" + elif command -v pacman &> /dev/null; then + pkg_manager="pacman" + if ! command -v speedtest-cli &> /dev/null; then + sudo pacman --noconfirm -S speedtest-cli + fi fi - + if [[ -z $pkg_manager ]]; then echo "Error: Package manager not found. You may need to install Speedtest manually." return 1 @@ -535,6 +540,7 @@ run_speedtest() { speedtest } + create_iplimit_jails() { # Use default bantime if not passed => 5 minutes local bantime="${1:-5}"