#找出匹配的
sp_pid=`ps -ef | grep cc-member-service.jar | grep -v grep | awk '{print $2}'`
if [ -z "$sp_pid" ];
then
echo "[ not find cc-member-service.jar pid ]"
else
echo "find result: $sp_pid "
kill -9 $sp_pid
nohup java -jar -Dspring.profiles.active=test -Xmx400m -Xms400m cc-member-service.jar > shop.out 2>&1 &
tail -f member.out
fi
# 清空
for i in `ps -ef | grep 'ssh -CfNg -L' |awk '{print $2}'`;
do echo "stopping [ $i ] ......";
kill -9 $i;
done