36 lines
723 B
Bash
Executable File
36 lines
723 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#date: 20190816
|
|
|
|
#禁止以root用户运行
|
|
curuser=`whoami`
|
|
if [ $curuser = "root1" ];then
|
|
echo "root Operation is not allowed!!"
|
|
exit -1
|
|
fi
|
|
|
|
#添加全局变量
|
|
export PATH=$PATH:/data/home/mmog/battle_server_999/runenv/tools
|
|
|
|
#定义启动进程函数
|
|
function start_all_svr(){
|
|
cd /data/home/mmog/battle_server_999/runenv/battle_svr/cfg
|
|
./start_battle_svr.sh
|
|
}
|
|
|
|
#启动进程
|
|
echo "-------- 开始启动进程 --------"
|
|
start_all_svr
|
|
sleep 2
|
|
|
|
#检查进程状态
|
|
cd /data/home/mmog/battle_server_999/runenv
|
|
if [ ! -f ./check_battle_all.sh ];then
|
|
echo "检查脚本check_battle_all.sh不存在"
|
|
exit 0
|
|
else
|
|
echo "-------- 打印启动结果 --------"
|
|
sh ./check_battle_all.sh
|
|
fi
|
|
|