Files
xkm-server/server_999/runenv/moderation_svr/cfg/stop_moderation_svr.sh
2025-05-07 19:34:09 +08:00

22 lines
463 B
Bash
Executable File

#!/bin/bash
curuser=`whoami`
if [ $curuser = "root1" ];then
echo "root Operation is not allowed!!"
exit -1
fi
# PID文件
moderation_pid="moderation_svr_10_999_ag.pid"
# 停止进程
result=$(ps -ef|grep ${moderation_pid} |grep -v grep|wc -l)
if [ "${result}" == "1" ];then
kill $(ps -ef|grep ${moderation_pid} |grep -v grep|awk '{print $2}')
echo "停止Moderation_Svr进程完成..."
else
echo "停止失败,Moderation_Svr进程未运行..."
fi