#!/bin/sh
mywar=1
while [ $mywar>0 ]
do
ps -e > myps.log
if [ 'grep -c mlnet myps.log'=0 ];then
echo We got problem.I will try to fix it. >> ~/checkMK.log
date >> checkMK.log
~/download/mldonkey-distrib-2.8.7/mlnet
fi
done
if [ 'grep -c mlnet myps.log'=0 ];then
echo We got problem.I will try to fix it. >> ~/checkMK.log
date >> checkMK.log
~/download/mldonkey-distrib-2.8.7/mlnet & #加&转到后台运行
fi
sleep 5; #每5秒钟检查一次
done