- 将多个服务的监听地址从 127.0.0.1 修改为 0.0.0.0,以支持外部访问 - 更新 stop_all.sh 脚本,启用 relay_svr 和 team_svr 的停止脚本 - 新增 relation_svr 的停止脚本 - 修改 tunnel_proxy 的 TunnelSvrIp 为 0.0.0.0
83 lines
1.4 KiB
Bash
Executable File
83 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
#date:2018090816
|
|
|
|
#禁止以root用户运行
|
|
curuser=`whoami`
|
|
if [ $curuser = "root1" ];then
|
|
echo "root Operation is not allowed!!"
|
|
exit -1
|
|
fi
|
|
|
|
#定义停止进程函数
|
|
function stop_all_svr(){
|
|
cd /data/home/mmog/server_999/runenv/
|
|
|
|
cd ./zone_svr/cfg/
|
|
./stop_zone_svr.sh
|
|
sleep 6
|
|
|
|
cd ../../zone_conn/cfg/
|
|
./stop_zone_conn.sh
|
|
|
|
cd ../../world_svr/cfg/
|
|
./stop_world_svr.sh
|
|
|
|
cd ../../relay_svr/cfg/
|
|
./stop_relay_svr.sh
|
|
|
|
cd ../../busd/cfg/
|
|
./stop_busd.sh
|
|
|
|
cd ../../redis_proxy/cfg/
|
|
./stop_redis_proxy.sh
|
|
|
|
cd ../../db_proxy/cfg/
|
|
./stop_db_proxy.sh
|
|
|
|
cd ../../db_global_proxy/cfg/
|
|
./stop_db_proxy.sh
|
|
|
|
cd ../../chat_svr/cfg/
|
|
./stop_chat_svr.sh
|
|
|
|
cd ../../relation_svr/cfg/
|
|
./stop_relation_svr.sh
|
|
|
|
cd ../../team_svr/cfg/
|
|
./stop_team_svr.sh
|
|
|
|
cd ../../moderation_svr/cfg/
|
|
./stop_moderation_svr.sh
|
|
|
|
cd ../../mq_proxy/cfg/
|
|
./stop_mq_proxy_svr.sh
|
|
|
|
}
|
|
|
|
#统计进程总数
|
|
proc_count=`ps -ef|grep a5game_zs_999|grep -v grep |wc -l`
|
|
|
|
#停止进程
|
|
if [ ${proc_count} -eq 0 ];then
|
|
echo "-------- a5game_zs_999 --------"
|
|
echo "未找到正在运行的进程,退出程序"
|
|
echo "------------------------------"
|
|
exit 0
|
|
else
|
|
echo "-------- 开始停止进程 ---------"
|
|
stop_all_svr
|
|
sleep 2
|
|
fi
|
|
|
|
#检查进程状态
|
|
cd /data/home/mmog/server_999/runenv/
|
|
if [ ! -f ./check_all.sh ];then
|
|
echo "检查脚本check_all.sh不存在"
|
|
exit 0
|
|
else
|
|
echo "-------- 打印停止结果 ---------"
|
|
sh ./check_all.sh
|
|
fi
|
|
|