#bin/bash
cd 
_p=`ps -ef | grep redis-server | grep -v grep | awk '{print $2}'`

echo "stop redis..."
for x in $_p
do
	echo "kill redis $x"
	kill -9 $x
	sleep 0.5
done

echo "start redis..."
/usr/local/bin/redis-server /home/quant_group/redis/redis1.conf
/usr/local/bin/redis-server /home/quant_group/redis/redis2.conf
/usr/local/bin/redis-server /home/quant_group/redis/redis3.conf
/usr/local/bin/redis-server /home/quant_group/redis/redis4.conf
/usr/local/bin/redis-server /home/quant_group/redis/redis5.conf

if [ $? = 0 ];then echo restart redis ok~;fi
