goProject/trunk/center/dbcenter/stop.sh

17 lines
329 B
Bash
Raw Permalink Normal View History

2025-01-23 16:12:49 +08:00
#!/bin/bash
# 查找 dbServer 的 PID
PID=$(pgrep dbServer)
if [ -z "$PID" ]; then
echo "dbServer 进程未找到"
else
echo "停止中... (PID: $PID)"
kill $PID
if [ $? -eq 0 ]; then
echo "dbServer 进程已终止 (PID: $PID)"
else
echo "无法终止 dbServer 进程 (PID: $PID)"
fi
fi