新增功能: - 添加 ensure_nginx_installed() 函数,自动检测并安装 Nginx - 在所有 Nginx 配置函数中调用确保 Nginx 已安装 - restart_nginx_safe() 新增宝塔面板路径支持(/www/server/nginx/sbin/nginx) 改进点: - 优先尝试宝塔面板的 Nginx 路径 - 支持在更新/修复模式下自动安装缺失的 Nginx - 根据不同包管理器自动选择安装方式(apt/yum/dnf/zypper) - 增强错误提示和安装验证 兼容性: - 完全兼容宝塔面板环境 - 兼容标准 Linux 系统环境 - 支持多种发行版的包管理器 这些改进使脚本能在更多环境下自动化部署,提升用户体验。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
159 KiB
159 KiB