更新 bin/ ZeroWrt.backup

Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
zhao 2025-01-24 01:13:44 +08:00
parent 003e5a8c78
commit 74e7ddc044

View File

@ -331,6 +331,7 @@ install_apps() {
color_output "\e[36m┃\e[0m 3. 部署 Subconverter \e[36m┃\e[0m"
color_output "\e[36m┃\e[0m 4. 部署 AdGuardhome \e[36m┃\e[0m"
color_output "\e[36m┃\e[0m 5. 部署 Gitea-MySQL \e[36m┃\e[0m"
color_output "\e[36m┃\e[0m 6. 部署 SunPanel \e[36m┃\e[0m"
color_output "\e[36m┃\e[0m 0. 返回主菜单 \e[36m┃\e[0m"
color_output "\e[36m┃ ┃\e[0m"
color_output "\e[36m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
@ -512,6 +513,44 @@ install_apps() {
fi
read -p "按 Enter 键返回..."
;;
6)
color_output "\e[34m[部署 SunPanel]\e[0m"
# 检查 SunPanel 容器是否已存在
if docker ps -a | grep -q "sunpanel"; then
color_output "\e[33mSunPanel 已经部署过,跳过部署!\e[0m"
read -p "按 Enter 键返回..."
continue
fi
color_output "\e[33m正在部署 SunPanel...\e[0m"
# 创建目录
mkdir -p /opt/sunpanel
# 下载 Docker Compose 文件到 /opt/sunpanel
curl -L https://git.kejizero.online/zhao/files/raw/branch/main/docker-compose/SunPanel -o /opt/sunpanel/docker-compose.yml
# 检查是否下载成功
if [ -f "/opt/sunpanel/docker-compose.yml" ]; then
color_output "\e[32mDocker Compose 文件下载成功!\e[0m"
else
color_output "\e[31mDocker Compose 文件下载失败!\e[0m"
read -p "按 Enter 键返回..."
continue
fi
# 部署 SunPanel
cd /opt/sunpanel
docker-compose up -d
if docker ps | grep -q "sunpanel"; then
color_output "\e[32mSunPanel 部署成功!\e[0m"
else
color_output "\e[31mSunPanel 部署失败!\e[0m"
fi
read -p "按 Enter 键返回..."
;;
0)
show_menu
return