mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/Mapleawaa/PVE-Tools-9.git
synced 2026-09-20 08:03:35 +08:00
PVE-Tools.sh 从 ~14,700 行单文件重构为 150 行入口点, 所有函数按职责拆分到独立文件,通过 source 机制加载。 lib/ — 基础设施层(零业务逻辑) config.sh: 全局变量与常量 core.sh: 日志、UI、确认、备份、GRUB、进度条 network.sh: 网络检测、镜像选择 runtime.sh: 运行时守卫、main() 入口 src/modules/ — 功能模块(10 个目录) 01-optimization 02-sources 03-boot-kernel 04-gpu-passthrough 05-vm-container 06-networking 07-storage-disk 08-tools-about 09-security 10-third-party 新增 build.sh(合并编译)和 dev.sh(开发 source 入口), release.yml 新增构建步骤,CI 适配模块化结构。
46 lines
1.1 KiB
Bash
46 lines
1.1 KiB
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
# Copyright (C) 2026 Ciriu Networks
|
|
|
|
temp_monitoring_menu() {
|
|
while true; do
|
|
clear
|
|
show_menu_header "温度监控管理"
|
|
show_menu_option "1" "配置温度监控 ${CYAN}(CPU/硬盘温度显示)${NC}"
|
|
show_menu_option "2" "${RED}移除温度监控${NC} (移除温度监控功能)"
|
|
show_menu_option "3" "UPS 状态诊断 ${CYAN}(NUT / upsc)${NC}"
|
|
echo "${UI_DIVIDER}"
|
|
show_menu_option "0" "返回上级菜单"
|
|
show_menu_footer
|
|
echo
|
|
read -p "请选择 [0-3]: " temp_choice
|
|
echo
|
|
|
|
case $temp_choice in
|
|
1)
|
|
cpu_add
|
|
;;
|
|
2)
|
|
cpu_del
|
|
;;
|
|
3)
|
|
show_ups_diagnostics
|
|
;;
|
|
0)
|
|
break
|
|
;;
|
|
*)
|
|
log_error "无效选择,请重新输入"
|
|
;;
|
|
esac
|
|
|
|
echo
|
|
pause_function
|
|
done
|
|
}
|
|
|
|
# 自定义温度监控配置
|
|
# 已经死了。
|
|
|
|
# Ceph管理菜单
|