gm更新脚本修改
parent
c32068993f
commit
0219eb655c
|
|
@ -87,15 +87,16 @@ gm_reboot(){
|
|||
|
||||
mod_gm_package(){
|
||||
ip=${1}
|
||||
package=gm.tar.gz
|
||||
# 源服务器上的tar压缩包路径
|
||||
source_tar="/data/update/project/miduo_gm/gm"
|
||||
# 游戏服目标服务器上的目标目录路径
|
||||
destination_dir="/data/jieling/gm"
|
||||
# 源服务器上的tar压缩包路径
|
||||
source_tar="/data/update/project/miduo_gm/gm/gm.tar.gz"
|
||||
if [ -e $source_tar ]; then
|
||||
echo "正在处理服务器 $ip"
|
||||
scp "$source_tar/$package" "$ip:$destination_dir"
|
||||
ssh "$ip" "tar -zxvf $destination_dir/$package -C $destination_dir"
|
||||
ssh "$ip" "rm -rf $destination_dir/$package"
|
||||
ssh "$ip" "rm -f $destination_dir/$package"
|
||||
echo "处理完成服务器 $ip "
|
||||
else
|
||||
echo "gm.tar.gz 不存在,请先去打包 "
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ rm -rf ${BASE_DIR}/hotfix/conf/*.json
|
|||
yes|cp -r ${BASE_DIR}/miduo_server/conf/c_database_version.json ${BASE_DIR}/hotfix/conf
|
||||
yes|cp -r ${BASE_DIR}/miduo_server/conf/hotfix.json ${BASE_DIR}/hotfix/conf
|
||||
|
||||
cd ${BASE_DIR}
|
||||
cd ${BASE_DIR} || exit
|
||||
find hotfix/conf/ -type f -name "*.txt"|egrep -v "c_database_version|hotfix"|xargs rm -rf
|
||||
find hotfix/conf/ -type f -name "*.class" |xargs rm -rf
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ cat ${BASE_DIR}/miduo_server/conf/c_database_version.json
|
|||
echo "cat miduo_server/conf/hotfix.json"
|
||||
cat ${BASE_DIR}/miduo_server/conf/hotfix.json
|
||||
|
||||
cd ${BASE_DIR}/hotfix
|
||||
cd ${BASE_DIR}/hotfix || exit
|
||||
tar -czvf hotfix.tar.gz ./*
|
||||
mv hotfix.tar.gz /data/update/package/${packages}
|
||||
echo "打包${packages}完成"
|
||||
|
|
|
|||
16
update_gm.sh
16
update_gm.sh
|
|
@ -28,15 +28,15 @@ mvn clean package
|
|||
#删除旧文件
|
||||
rm -rf ${BASE_DIR}/gm/*
|
||||
#创建新目录文件
|
||||
zip_dir=${BASE_DIR}/gm/config
|
||||
mkdir -p ${zip_dir}/jsonconf
|
||||
mkdir -p ${zip_dir}/script
|
||||
json_dir=${BASE_DIR}/gm/config/jsonconf
|
||||
mkdir -p ${json_dir}
|
||||
#复制文件
|
||||
cp -rf ${TABLE_DIR}/miduo_server/conf/server/ItemConfig.txt ${zip_dir}/jsonconf/ItemConfig.txt
|
||||
cp -rf ${TABLE_DIR}/miduo_server/conf/server/RechargeCommodityConfig.txt ${zip_dir}/jsonconf/RechargeCommodityConfig.txt
|
||||
cp -rf ${BASE_DIR}/conf/jsonconf/Reason.txt ${zip_dir}/jsonconf/Reason.txt
|
||||
cp -rf ${BASE_DIR}/target/gm_tw_admin-1.0-SNAPSHOT.jar ${BASE_DIR}/gm/gm_tw_admin-1.0-SNAPSHOT.jar
|
||||
cp -rf ${BASE_DIR}/conf/script ${BASE_DIR}/gm/config/script
|
||||
cp -f ${TABLE_DIR}/miduo_server/conf/server/ItemConfig.txt ${json_dir}/ItemConfig.txt
|
||||
cp -f ${TABLE_DIR}/miduo_server/conf/server/RechargeCommodityConfig.txt ${json_dir}/RechargeCommodityConfig.txt
|
||||
cp -f ${BASE_DIR}/conf/jsonconf/Reason.txt ${json_dir}/Reason.txt
|
||||
cp -f ${BASE_DIR}/target/gm_tw_admin-1.0-SNAPSHOT.jar ${BASE_DIR}/gm/gm_tw_admin-1.0-SNAPSHOT.jar
|
||||
cp -rf ${BASE_DIR}/conf/script ${BASE_DIR}/gm/config
|
||||
mv ${BASE_DIR}/gm/config/script/gm_reboot.sh ${BASE_DIR}/gm/gm_reboot.sh
|
||||
|
||||
#打包
|
||||
cd ${BASE_DIR}/gm || exit
|
||||
|
|
|
|||
Loading…
Reference in New Issue