From 4943ef4137a22c2734fc8a19734a918d10323879 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Wed, 20 May 2026 09:30:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 4068fc2..3c3fd4b 100644 --- a/install.sh +++ b/install.sh @@ -49,9 +49,10 @@ check_container_status(){ } main(){ + local container_status=$(check_container_status) # 显示菜单 echo "" - echo 运行状态: $(check_container_status) + echo 运行状态: $container_status echo "==============================" echo "请选择一个操作:" echo "1. 一键部署" @@ -96,6 +97,10 @@ main(){ ;; 5) # 停止 + if echo "$container_status" | grep -q "未运行"; then + echo "程序已停止" + return + fi docker compose -f ./docker-compose.yml down ;; 6)