mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2025-01-26 23:15:19 +00:00
取消互动信息
This commit is contained in:
parent
2f3dc9ef79
commit
3e19b74497
@ -251,6 +251,8 @@ install_dependencies() {
|
||||
done
|
||||
;;
|
||||
*)
|
||||
install_cmd="apt-get install -yq"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
for dep in "${dependencies[@]}"; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
echo -e "${YELLOW}正在安装 $dep...${NC}"
|
||||
|
16
Nlbench.sh
16
Nlbench.sh
@ -202,7 +202,6 @@ update_system() {
|
||||
# 定义支持的操作系统类型
|
||||
SUPPORTED_OS=("ubuntu" "debian" "linuxmint" "elementary" "pop" "centos" "rhel" "fedora" "rocky" "almalinux" "openeuler" "opensuse" "sles" "arch" "manjaro" "alpine" "gentoo" "cloudlinux")
|
||||
|
||||
# 安装依赖
|
||||
install_dependencies() {
|
||||
echo -e "${YELLOW}正在检查并安装必要的依赖项...${NC}"
|
||||
|
||||
@ -225,11 +224,11 @@ install_dependencies() {
|
||||
|
||||
case "${os_type,,}" in
|
||||
gentoo)
|
||||
install_cmd="emerge"
|
||||
install_cmd="emerge --quiet"
|
||||
for dep in "${dependencies[@]}"; do
|
||||
if ! emerge -p $dep &>/dev/null; then
|
||||
if ! emerge -p "$dep" &>/dev/null; then
|
||||
echo -e "${YELLOW}正在安装 $dep...${NC}"
|
||||
if ! sudo $install_cmd $dep; then
|
||||
if ! sudo $install_cmd "$dep"; then
|
||||
echo -e "${RED}无法安装 $dep。请手动安装此依赖项。${NC}"
|
||||
fi
|
||||
else
|
||||
@ -238,9 +237,9 @@ install_dependencies() {
|
||||
done
|
||||
;;
|
||||
alpine)
|
||||
install_cmd="apk add"
|
||||
install_cmd="apk add --no-cache"
|
||||
for dep in "${dependencies[@]}"; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
if ! command -v "$dep" &>/dev/null; then
|
||||
echo -e "${YELLOW}正在安装 $dep...${NC}"
|
||||
if ! sudo $install_cmd "$dep"; then
|
||||
echo -e "${RED}无法安装 $dep。请手动安装此依赖项。${NC}"
|
||||
@ -251,8 +250,10 @@ install_dependencies() {
|
||||
done
|
||||
;;
|
||||
*)
|
||||
install_cmd="apt-get install -yq"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
for dep in "${dependencies[@]}"; do
|
||||
if ! command -v "$dep" &> /dev/null; then
|
||||
if ! command -v "$dep" &>/dev/null; then
|
||||
echo -e "${YELLOW}正在安装 $dep...${NC}"
|
||||
if ! sudo $install_cmd "$dep"; then
|
||||
echo -e "${RED}无法安装 $dep。请手动安装此依赖项。${NC}"
|
||||
@ -268,6 +269,7 @@ install_dependencies() {
|
||||
clear
|
||||
}
|
||||
|
||||
|
||||
# 获取IP地址和ISP信息
|
||||
ip_address_and_isp() {
|
||||
ipv4_address=$(curl -s --max-time 5 ipv4.ip.sb)
|
||||
|
Loading…
Reference in New Issue
Block a user