Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run_cluster.sh #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions script/run_28181.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function docker_run(){
docker run --name $DOCKER_GBSIP_NAME --net $DOCKER_NETWORK --ip $DOCKER_GBSIP_IP --restart always --privileged=true -v $DOCKER_GBSIP_PATH:/MyData -e MyDataPath=/MyData -p $DOCKER_GBSIP_HTTP_PORT:80 -p $DOCKER_GBSIP_PORT:$DOCKER_GBSIP_PORT/tcp -p $DOCKER_GBSIP_PORT:$DOCKER_GBSIP_PORT/udp -d $DOCKER_GBSIP_IMAGE_NAME
}
function main(){
echo "依耐文件检查...."
echo "依赖文件检查...."
init_system_files_path

if [ -n "$MYSQL_Server_IP" ] ;then
Expand All @@ -124,7 +124,7 @@ function main(){
#启动镜像
docker_run

echo "GB28281服务启动完成"
echo "GB28181服务启动完成"
echo ""
}
###################################脚本入口#######################################
Expand Down
4 changes: 2 additions & 2 deletions script/run_28181_gb2jt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ function docker_run(){
docker run --name $DOCKER_GB2JT_NAME --net $DOCKER_NETWORK --ip $DOCKER_GB2JT_IP --restart always --privileged=true -v $DOCKER_GB2JT_PATH:/MyData -e MyDataPath=/MyData -p $DOCKER_SIP_PORT:$DOCKER_SIP_PORT/tcp -p $DOCKER_SIP_PORT:$DOCKER_SIP_PORT/udp -p $DOCKER_RTP_PORT:$DOCKER_RTP_PORT/tcp -p $DOCKER_RTP_PORT:$DOCKER_RTP_PORT/udp -d $DOCKER_GB2JT_IMAGE_NAME
}
function main(){
echo "依耐文件检查...."
echo "依赖文件检查...."
init_system_files_path

#启动镜像
docker_run

echo "GB28281服务启动完成"
echo "GB28181服务启动完成"
echo ""
}
###################################脚本入口#######################################
Expand Down
2 changes: 1 addition & 1 deletion script/run_attachment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function docker_run(){
-d $DOCKER_ATTACHMENT_IMAGE_NAME
}
function main(){
echo "依耐文件检查...."
echo "依赖文件检查...."
init_system_files_path

#启动镜像
Expand Down
2 changes: 1 addition & 1 deletion script/run_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function docker_run(){
docker run --name $DOCKER_CLUSTER_NAME --net $DOCKER_NETWORK --ip $DOCKER_CVCLUSTER_IP --restart always --privileged=true -v $DOCKER_CLUSTER_PATH:/MyData -e MyDataPath=/MyData -p $DOCKER_HTTP_PORT:80 -p $DOCKER_HTTPS_PORT:443 -p $DOCKER_WEBSOCKET_PORT:17000 -d $DOCKER_CLUSTER_IMAGE_NAME
}
function main(){
echo "依耐文件检查...."
echo "依赖文件检查...."
init_system_files_path

#启动镜像
Expand Down
6 changes: 3 additions & 3 deletions script/run_gw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ function docker_run(){
docker_stat $DOCKER_REDIS_NAME
ret=$?
if [[ ret -eq 2 ]]; then
echo "REDIS未安装,即将安装REDIS"
echo "Redis未安装,即将安装Redis"
docker run --name $DOCKER_REDIS_NAME --net $DOCKER_NETWORK --ip $DOCKER_REDIS_IP --restart always --privileged=true -d $DOCKER_REDIS_IMAGE_NAME
cd ..
elif [[ ret -eq 1 ]]; then
echo "REDIS已启动"
echo "Redis已启动"
else
echo "REDIS未启动,即将启动REDIS"
echo "Redis未启动,即将启动Redis"
docker start $DOCKER_REDIS_NAME
fi

Expand Down
16 changes: 8 additions & 8 deletions script/run_rtvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NGINX_DOCKER_IMAGE_NAME=${NGINX_DOCKER_IMAGE_NAME:-"vanjoge/nginx-rtmp:flvlive"}
MYSQL_DOCKER_CONTAINER_NAME=${MYSQL_DOCKER_CONTAINER_NAME:-"mysql5.7"}
MYSQL_DOCKER_PATH=${MYSQL_DOCKER_PATH:-"/etc/mysql"}
MYSQL_DOCKER_IP=${MYSQL_DOCKER_IP:-"172.29.108.241"}
#传入有效值时不启动MYSQL实例
#传入有效值时不启动Mysql实例
#MYSQL_Server_IP
#MYSQL_Server_PORT

Expand Down Expand Up @@ -147,7 +147,7 @@ function init_system_files_path_base()
if [[ ! -d "$TSDB_DOCKER_PATH/scripts" ]]; then
mkdir $TSDB_DOCKER_PATH/scripts
fi
# 创建grafana目录
# 创建Grafana目录
if [[ ! -d "$GRAFANA_DOCKER_PATH" ]]; then
mkdir $GRAFANA_DOCKER_PATH
fi
Expand Down Expand Up @@ -342,7 +342,7 @@ function docker_base_install()
InfluxdbBaseUrl="http://$TSDB_DOCKER_IP:8086"
fi
if [[ "$RUN_GRAFANA" == "true" ]]; then
#grafana安装检查
#Grafana安装检查
docker_grafana_checkAndInstall
fi

Expand Down Expand Up @@ -373,19 +373,19 @@ function docker_mysql_checkAndInstall(){
docker_stat $MYSQL_DOCKER_CONTAINER_NAME
ret=$?
if [[ ret -eq 2 ]]; then
echo "MYSQL未安装,即将安装MYSQL"
echo "Mysql未安装,即将安装Mysql"
cd mysql
docker_mysql_install
cd ..
elif [[ ret -eq 1 ]]; then
echo "MYSQL已启动"
echo "Mysql已启动"
else
echo "MYSQL未启动,即将启动MYSQL"
echo "Mysql未启动,即将启动Mysql"
docker start $MYSQL_DOCKER_CONTAINER_NAME
fi

#创建数据库表检查
echo "正在进行MYSQL数据库表检查"
echo "正在进行Mysql数据库表检查"
cd mysql
cp docker_mysql_create_table.sh $MYSQL_DOCKER_PATH/scripts/docker_mysql_create_table.sh
chmod a+x $MYSQL_DOCKER_PATH/scripts/docker_mysql_create_table.sh
Expand Down Expand Up @@ -482,7 +482,7 @@ function docker_grafana_checkAndInstall(){
docker_stat $GRAFANA_DOCKER_CONTAINER_NAME
ret=$?
if [[ ret -eq 2 ]]; then
echo "grafana未安装,即将开始安装"
echo "Grafana未安装,即将开始安装"
cd grafana
docker_grafana_install
cd ..
Expand Down