if [ `ps -ef | grep cluster-check|grep -v grep|wc -l` -ge 1 ];then
echo you had started this check tool, don\'t start angin!
else
nohup java -jar cluster-check.jar > /dev/null 2>&1 &
   if [ `ps -ef|grep cluster-check|grep -v grep|wc -l` -ge 1 ];then
      echo start check tool successfully!
   else
      echo start check tool faied!
   fi
startUp=`cat conf.properties | grep -w 'startOnUp' | cut -d '=' -f 2`
jarpath=`pwd`
   if [ $startUp = "true" ]
   then
      if [ `grep 'cluster-check.jar' /etc/rc.local|wc -l` -lt 1 ];then
         echo "appending the tool to boot task...."
         echo "cd $jarpath && nohup java -jar cluster-check.jar > /dev/null 2>&1 &" | sudo tee -a /etc/rc.d/rc.local
         echo "append success!"
      else
         echo "check tool has been appended to boot task!"
      fi
   fi
fi
