美文网首页
Linux获取pid

Linux获取pid

作者: 青风野客 | 来源:发表于2019-05-16 12:33 被阅读0次
#!/bin/sh
pid=`ps -ef|grep 'renren' |grep -v grep|awk '{print $2}'`
echo '结束进程'
echo $pid
kill $pid
sleep 5s
echo '启动接口'
nohup java -jar renren-api.jar >nohup.out 2>&1 &
tail -f nohup.out

相关文章

网友评论

      本文标题:Linux获取pid

      本文链接:https://www.haomeiwen.com/subject/jjzbaqtx.html