Files
hzhub/hzhub-ai/stop.sh
大壮 278e507e8a feat: 添加员工门户项目及相关后端改造
- 新增 hzhub-portal-employee 员工门户前端项目(基于 Vue3 + Element Plus)
- 后端登录接口增加返回 nickName 字段
- 移除 KnowledgeInfoController 的 @SaCheckPermission 注解
- 删除 hzhub-portal-company 旧门户项目
- 更新项目文档和架构说明
- 添加后台运行管理脚本(start-all.sh / status-all.sh / stop-all.sh)
- 更新 docker-compose 配置

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 03:47:33 +00:00

44 lines
985 B
Bash
Executable File
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
# HZHub AI 后端服务停止脚本
# 功能:停止后台运行的 hzhub-ai Spring Boot 服务
PROJECT_NAME="hzhub-ai"
PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"
PID_FILE="$PROJECT_DIR/.pid"
echo "========================================="
echo "停止 $PROJECT_NAME 后端服务"
echo "========================================="
# 检查PID文件是否存在
if [ ! -f "$PID_FILE" ]; then
echo "⚠️ 未找到PID文件服务可能未运行"
exit 0
fi
PID=$(cat "$PID_FILE")
# 检查进程是否存在
if ! ps -p "$PID" > /dev/null 2>&1; then
echo "⚠️ 进程不存在 (PID: $PID)"
rm -f "$PID_FILE"
exit 0
fi
# 停止进程
echo "🛑 正在停止服务 (PID: $PID)..."
kill "$PID"
# 等待进程结束
sleep 3
# 检查进程是否已停止
if ps -p "$PID" > /dev/null 2>&1; then
echo "⚠️ 进程未响应,强制终止..."
kill -9 "$PID"
sleep 2
fi
# 清理PID文件
rm -f "$PID_FILE"
echo "✅ 服务已停止"