vllm-mac/stop.sh

21 lines
440 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 停止本地 vLLM 服务
PID_FILE="vllm.pid"
if [ ! -f "$PID_FILE" ]; then
echo "⚠️ 未找到 PID 文件vLLM 可能未运行。"
exit 1
fi
PID=$(cat "$PID_FILE")
if ps -p "$PID" > /dev/null 2>&1; then
echo "🛑 停止 vLLM (PID=$PID)..."
kill "$PID"
rm -f "$PID_FILE"
echo "✅ 已关闭 vLLM 服务。"
else
echo "⚠️ 未找到运行中的 vLLM 进程。"
rm -f "$PID_FILE"
fi