shell指令碼判斷某個linux程式是否在正常執行,如果不是就啟動他
# author qzlink
# time 2014-9-19
# program : check program running ..
function check(){
count=`ps -ef |grep $1 |grep -v "grep"|wc -l`
#echo $count
if [ 0 == $count ];then
#nohup python /runscript/working/$1 &
/etc/init.d/mbx2009d start
fi
}
check mbx2009