Commit 53821256 authored by QM's avatar QM

updata

parent 00e4a3f7
...@@ -12,6 +12,8 @@ RED='\033[1;31m' ...@@ -12,6 +12,8 @@ RED='\033[1;31m'
GRE='\033[1;32m' GRE='\033[1;32m'
NOC='\033[0m' NOC='\033[0m'
inetAddr=""
# 出错退出前拷贝日志文件 # 出错退出前拷贝日志文件
function exit_cp_file() { function exit_cp_file() {
# shellcheck disable=SC2116 # shellcheck disable=SC2116
...@@ -350,7 +352,7 @@ function check_addr() { ...@@ -350,7 +352,7 @@ function check_addr() {
} }
function get_inet_addr() { function get_inet_addr() {
local inetAddr=$(ifconfig wlp2s0 | grep "inet " | awk '{ print $2}' | awk -F: '{print $2}') inetAddr=$(ifconfig wlp2s0 | grep "inet " | awk '{ print $2}' | awk -F: '{print $2}')
if [[ ${inetAddr} == "" ]]; then if [[ ${inetAddr} == "" ]]; then
inetAddr=$(ifconfig wlp2s0 | grep "inet " | awk '{ print $2}') inetAddr=$(ifconfig wlp2s0 | grep "inet " | awk '{ print $2}')
if [[ ${inetAddr} == "" ]]; then if [[ ${inetAddr} == "" ]]; then
...@@ -386,7 +388,8 @@ function updata_relayer_toml() { ...@@ -386,7 +388,8 @@ function updata_relayer_toml() {
exit_cp_file exit_cp_file
fi fi
local pushHost=$(get_inet_addr) get_inet_addr
local pushHost="${inetAddr}"
if [[ ${pushHost} == "" ]]; then if [[ ${pushHost} == "" ]]; then
echo -e "${RED}pushHost is empty${NOC}" echo -e "${RED}pushHost is empty${NOC}"
exit_cp_file exit_cp_file
...@@ -488,8 +491,8 @@ function updata_relayer_toml_rpc() { ...@@ -488,8 +491,8 @@ function updata_relayer_toml_rpc() {
local MAIN_HTTP=${3} local MAIN_HTTP=${3}
local file=${4} local file=${4}
# shellcheck disable=SC2155 get_inet_addr
local pushHost=$(get_inet_addr) local pushHost="${inetAddr}"
if [[ ${pushHost} == "" ]]; then if [[ ${pushHost} == "" ]]; then
echo -e "${RED}pushHost is empty${NOC}" echo -e "${RED}pushHost is empty${NOC}"
fi fi
......
...@@ -416,9 +416,6 @@ function rpc_test() { ...@@ -416,9 +416,6 @@ function rpc_test() {
copyErrLogs copyErrLogs
docker ps -a
docker logs -f "${dockerNamePrefix}_ebrelayera_rpc_1" | head -n 1000
docker-compose -f ./x2ethereum/docker-compose-x2ethereum.yml down docker-compose -f ./x2ethereum/docker-compose-x2ethereum.yml down
fi fi
chain33_RpcTestRst x2ethereum "$CASE_ERR" chain33_RpcTestRst x2ethereum "$CASE_ERR"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment