#!/bin/bash
cwd=`pwd`
host=$1
serverid=$2
redisip=$3
dbIndex=$4
current_date=$(date "+%Y%m%d")

logicMID=$((300000 + serverid))
gatewayMID=$((400000 + serverid))
echo "$logicMID"
echo "$gatewayMID"
ssh $host "kill -9 \$(cat /home/pid/$gatewayMID.pid)"
ssh $host "kill -9 \$(cat /home/pid/$logicMID.pid)"
cat /home/mfqy/pkg/personaltopgame/$current_date | redis-cli -h $redisip -p 6379 -n $dbIndex -x SET SLG:PersonalTopGameBaseData
exit 1
