From bf87cb1a1f2910ab491d087e75f1e142f5044586 Mon Sep 17 00:00:00 2001 From: zhao Date: Fri, 27 Dec 2024 11:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20bin/ZeroWrt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- bin/ZeroWrt | 49 +------------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/bin/ZeroWrt b/bin/ZeroWrt index 89a80e9..1b8608a 100644 --- a/bin/ZeroWrt +++ b/bin/ZeroWrt @@ -165,12 +165,11 @@ install_apps() { color_output "\e[36m┃\e[0m 1. 部署 ShellClash \e[36m┃\e[0m" color_output "\e[36m┃\e[0m 2. 部署 小雅 Alist \e[36m┃\e[0m" color_output "\e[36m┃\e[0m 3. 部署 Subconverter \e[36m┃\e[0m" - color_output "\e[36m┃\e[0m 4. 部署 Alist \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" - read -p "$(color_output "\e[33m请输入您的选择 [0-4]: \e[0m")" app_choice + read -p "$(color_output "\e[33m请输入您的选择 [0-3]: \e[0m")" app_choice case "$app_choice" in 1) @@ -267,52 +266,6 @@ install_apps() { fi read -p "按 Enter 键返回..." ;; - 4) - color_output "\e[34m[部署 Alist]\e[0m" - - # 检查 Alist 是否已运行 - if docker ps | grep -q "alist"; then - # 获取本机 IP 地址 - local_ip=$(ip addr show br-lan | grep -w inet | awk '{print $2}' | cut -d/ -f1) - - color_output "\e[32mAlist 已经在运行!\e[0m" - color_output "\e[33m您的访问地址:\e[0m" - color_output "\e[32mhttp://${local_ip}:5244\e[0m" - else - # 检查 Docker 是否已安装 - if ! command -v docker &> /dev/null; then - color_output "\e[33m未检测到 Docker,正在安装...\e[0m" - opkg update && opkg install docker - fi - - # 创建 Alist 配置目录 - mkdir -p /etc/alist - - color_output "\e[33m正在部署 Alist...\e[0m" - docker run -d --restart=unless-stopped \ - -v /etc/alist:/opt/alist/data \ - -p 5244:5244 \ - -e PUID=0 \ - -e PGID=0 \ - -e UMASK=022 \ - --name="alist" \ - xhofe/alist:latest - - sleep 3 # 等待容器完全启动 - docker exec -it alist ./alist admin set password - - # 获取本机 IP 地址 - local_ip=$(ip addr show br-lan | grep -w inet | awk '{print $2}' | cut -d/ -f1) - - color_output "\e[32m\nAlist 部署完成!\e[0m" - color_output "\e[33m您的登录信息:\e[0m" - color_output "账号: \e[32madmin\e[0m" - color_output "密码: \e[32mpassword\e[0m" - color_output "\e[33m请使用浏览器访问:\e[0m" - color_output "\e[32mhttp://${local_ip}:5244\e[0m" - fi - read -p "按 Enter 键返回..." - ;; 0) show_menu return