ai-chat-ui/stop_python_server.sh

13 lines
319 B
Bash

#!/bin/bash
# 停止Python服务器的脚本
echo "正在停止Python AI Chat服务器..."
# 查找并终止在8000端口运行的Python进程
PID=$(lsof -t -i:8000)
if [ -n "$PID" ]; then
kill $PID
echo "服务器进程 (PID: $PID) 已停止"
else
echo "在端口8000上没有找到运行的服务器"
fi