更新各种脚本

This commit is contained in:
2026-02-22 20:55:05 +08:00
parent fd373d10c8
commit 68f6f02ec5
9 changed files with 330 additions and 8 deletions

View File

@ -91,6 +91,21 @@ interactive_config() {
print_info "=== 配置服务参数 ==="
echo ""
# 检查是否为非交互模式(通过管道执行)
if [ ! -t 0 ]; then
print_info "检测到非交互模式,使用默认配置"
SERVER_URL=""
INTERVAL=300
LOG_LEVEL="info"
print_info "配置摘要:"
echo " 服务器 URL: ${SERVER_URL:-未配置}"
echo " 检查间隔: ${INTERVAL}"
echo " 日志级别: ${LOG_LEVEL}"
echo ""
return
fi
# 服务器 URL
read -p "请输入服务器 URL用于上报磁盘状态留空则不上报: " SERVER_URL
SERVER_URL=${SERVER_URL:-""}