增加停止指定命令接口

This commit is contained in:
whyour
2023-05-01 22:56:47 +08:00
parent 8db997abe8
commit 0af687f781
5 changed files with 42 additions and 8 deletions
+1 -1
View File
@@ -42,6 +42,6 @@ echo -e "\npython3依赖安装成功...\n"
echo -e "4、启动bot程序...\n"
make_dir $dir_log/bot
cd $dir_data
ps -ef | grep "python3 -m jbot" | grep -v grep | awk '{print $1}' | xargs kill -9 2>/dev/null
ps -eo pid,command | grep "python3 -m jbot" | grep -v grep | awk '{print $1}' | xargs kill -9 2>/dev/null
nohup python3 -m jbot >$dir_log/bot/nohup.log 2>&1 &
echo -e "bot启动成功...\n"
+1 -1
View File
@@ -38,7 +38,7 @@ pm2_log() {
}
check_nginx() {
local nginxPid=$(ps -ef | grep nginx | grep -v grep)
local nginxPid=$(ps -eo pid,command | grep nginx | grep -v grep)
echo -e "=====> 检测nginx服务\n$nginxPid"
if [[ $nginxPid ]]; then
echo -e "\n=====> nginx服务正常\n"