#! /bin/bash
CheckProcess()
{
if ["$1"=""]
then
return 1
fi
PROCESS_NUM= 'ps -ef | grep "$1" | grep -v "grep" | wc -l'
if [ $PROCESS_NUM -ep 1]
then
return 0
else
return 1
fi
}
while [ 1 ] ; do
CheckProcess rtctime
CheckQQ_RET= $?
if[$CheckQQ_RET -eq 1]
then
killall -9 rtctime
exec ./rtctime &
fi
sleep 1
done;
此帖出自
Linux与安卓论坛
一周热门 更多>