mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-31 23:36:18 +00:00
Update x-ui.sh
This commit is contained in:
parent
d95dc7542c
commit
033e3391ba
1 changed files with 8 additions and 2 deletions
10
x-ui.sh
10
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}"
|
||||
|
|
Loading…
Reference in a new issue