判断nginx是否运行中:
if ps -ef|grep "nginx"|egrep -v grep >/dev/null
then
echo ok!
else
echo no!
fi
Posted blog of asml
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux中 shell编程 判断服务是否运行相关的知识,希望对你有一定的参考价值。
判断nginx是否运行中:
if ps -ef|grep "nginx"|egrep -v grep >/dev/null
then
echo ok!
else
echo no!
fi
以上是关于linux中 shell编程 判断服务是否运行的主要内容,如果未能解决你的问题,请参考以下文章