From 1c5f11eccb2b4eeb9800a4ed1c0288353e8b3680 Mon Sep 17 00:00:00 2001 From: wangmeihua <13383952685@163.com> Date: Wed, 2 Jul 2025 15:06:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0/=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E5=90=91=E9=87=8F=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/connection/stop.sh | 12 ++++++++++++ test/entities/stop.sh | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 test/connection/stop.sh create mode 100755 test/entities/stop.sh diff --git a/test/connection/stop.sh b/test/connection/stop.sh new file mode 100755 index 0000000..2492dd7 --- /dev/null +++ b/test/connection/stop.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +PORT=8888 +PID=$(lsof -t -i:$PORT) + +if [ -n "$PID" ]; then + echo "找到端口 $PORT 的进程: PID=$PID" + kill -9 $PID + echo "已终止端口 $PORT 的进程" +else + echo "未找到端口 $PORT 的进程" +fi \ No newline at end of file diff --git a/test/entities/stop.sh b/test/entities/stop.sh new file mode 100755 index 0000000..d3e21d0 --- /dev/null +++ b/test/entities/stop.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +PORT=9990 +PID=$(lsof -t -i:$PORT) + +if [ -n "$PID" ]; then + echo "找到端口 $PORT 的进程: PID=$PID" + kill -9 $PID + echo "已终止端口 $PORT 的进程" +else + echo "未找到端口 $PORT 的进程" +fi \ No newline at end of file