554325746@qq.com
2019-11-26 eaf45e72104a271f1219c877f68d57d7c1abe1e8
监测进程重启脚本
1个文件已添加
16 ■■■■■ 已修改文件
restart 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
restart
New file
@@ -0,0 +1,16 @@
#!/bin/bash
while true
do
    number=`ps -ef | grep "ruleprocess" | grep -v "restartPanlei" |grep -v "grep" | wc -l`
    echo $number
    if [ $number -eq 0 ];then
      cd /home/basic/workspace/gitblit/ruleprocess
      nohup ./ruleprocess &
      echo `date +%Y-%m-%d` `date +%H:%M:%S`  "restart 服务" >> restart.log
    else
      echo "hello"
    fi
    sleep 3
done