#!/bin/bash

pidName=/data/work/S1PVP.pid
matchLog=match.log
roomLog=room.log
informLog=inform.log
time=$(date "+%Y%m%d-%H%M%S")
newMatchLog=match-$time.log
newRoomLog=room-$time.log
newInformLog=inform-$time.log


for line in `cat $pidName`
do 
	kill -9 $line
done

cat /dev/null > $pidName

#重命名日志文件
mv /data/log/$matchLog /data/log/$newMatchLog
mv /data/log/$roomLog /data/log/$newRoomLog
mv /data/log/$informLog /data/log/$newInformLog

#打印进程信息
ps -fe | grep pvp

echo "finish"