You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.0 KiB
51 lines
1.0 KiB
#!/bin/bash
|
|
#容器启动之后需要初始环境
|
|
. /3rd/env.env
|
|
|
|
CENTER_CODE=$1 #容器编号
|
|
|
|
if [ ! -n "$CENTER_CODE" ]; then
|
|
echo "Please enter a code"
|
|
exit 1
|
|
else
|
|
echo "starting code generation"
|
|
fi
|
|
./3rd/replace.sh "${CENTER_CODE}"
|
|
#****************************** bussiness info replace docker************
|
|
#MYSQL_HOST="10.100.0.5"
|
|
DEV_BASE_PATH=/data/mmogrun/publish
|
|
CTRL_SH_PATH=${DEV_BASE_PATH}/ctrl_sh
|
|
TOOLS_PATH=${DEV_BASE_PATH}/tools
|
|
SQL_FILE_PATH=${TOOLS_PATH}/sql
|
|
# shellcheck disable=SC2164
|
|
cd ${SQL_FILE_PATH}
|
|
mysql -h${MYSQL_HOST} -ummog -pmmog <dbaccount.sql
|
|
mysql -h${MYSQL_HOST} -ummog -pmmog <toss.sql
|
|
mysql -h${MYSQL_HOST} -ummog -pmmog <dbgame.sql
|
|
# shellcheck disable=SC2164
|
|
cd ${CTRL_SH_PATH}
|
|
./stop_all.sh #防止有进程正在启动
|
|
./start_all.sh
|
|
ps aux|grep sog
|
|
|
|
# 启动GM web
|
|
WEB_PATCH=/data/wwwroot/oss
|
|
cd ${WEB_PATCH}
|
|
unzip -o web.zip
|
|
|
|
NGINX_CONFIG_PATCH=/etc/nginx/sites-available/
|
|
cd ${NGINX_CONFIG_PATCH}
|
|
|
|
LOCAL_HOST=$(hostname -I | sed 's/ //g')
|
|
sed -i -e "s#172.17.0.1#${LOCAL_HOST}#g" default
|
|
nginx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|