mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-11-20 15:05:22 +00:00
Update Nlbench_beta.sh
This commit is contained in:
parent
b1a2980d4a
commit
bf7f1f074b
@ -219,23 +219,6 @@ sum_run_times() {
|
||||
# 调用函数获取统计数据
|
||||
sum_run_times
|
||||
|
||||
# 更新系统
|
||||
update_system() {
|
||||
if command -v apt &>/dev/null; then
|
||||
apt-get update && apt-get upgrade -y
|
||||
elif command -v dnf &>/dev/null; then
|
||||
dnf check-update && dnf upgrade -y
|
||||
elif command -v yum &>/dev/null; then
|
||||
yum check-update && yum upgrade -y
|
||||
elif command -v apk &>/dev/null; then
|
||||
apk update && apk upgrade
|
||||
else
|
||||
echo -e "${RED}不支持的Linux发行版${NC}"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# 执行单个脚本并输出结果到文件
|
||||
run_script() {
|
||||
local script_number=$1
|
||||
@ -424,10 +407,10 @@ run_selected_scripts() {
|
||||
|
||||
while true; do
|
||||
read -p "请输入要执行的脚本编号(用英文逗号分隔,例如:1,2,3):" script_numbers
|
||||
if [[ "$script_numbers" =~ ^[0-9](,[0-9])*$ ]]; then
|
||||
if [[ "$script_numbers" =~ ^[0-10](,[0-10])*$ ]]; then
|
||||
break
|
||||
else
|
||||
echo -e "${RED}无效输入,请输入0-9之间的数字,用英文逗号分隔。${NC}"
|
||||
echo -e "${RED}无效输入,请输入0-10之间的数字,用英文逗号分隔。${NC}"
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user