#!/bin/bash

pidName=/data/work/editionPVP.pid
matchLog=match_edition.log
roomLog=room_edition.log
informLog=inform_edition.log
time=$(date "+%Y%m%d-%H%M%S")
newMatchLog=match_edition-$time.log
newRoomLog=room_edition-$time.log
newInformLog=inform_edition-$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 edition

echo "finish"