diff --git a/WeBASE-Data-Collect/start.sh b/WeBASE-Data-Collect/start.sh index 5b97216..b764db5 100644 --- a/WeBASE-Data-Collect/start.sh +++ b/WeBASE-Data-Collect/start.sh @@ -6,7 +6,7 @@ CURRENT_DIR=$(pwd)/ LOG_DIR=${CURRENT_DIR}log CONF_DIR=${CURRENT_DIR}conf -SERVER_PORT=$(cat $CONF_DIR/application.yml| grep "port" | awk '{print $2}'| sed 's/\r//') +SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured" exit -1 diff --git a/WeBASE-Data-Collect/status.sh b/WeBASE-Data-Collect/status.sh index e96acff..994ee3b 100644 --- a/WeBASE-Data-Collect/status.sh +++ b/WeBASE-Data-Collect/status.sh @@ -4,7 +4,7 @@ APP_MAIN=com.webank.webase.data.collect.Application CURRENT_DIR=$(pwd)/ CONF_DIR=${CURRENT_DIR}conf -SERVER_PORT=$(cat $CONF_DIR/application.yml| grep "port" | awk '{print $2}'| sed 's/\r//') +SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured" exit -1 diff --git a/WeBASE-Data-Collect/stop.sh b/WeBASE-Data-Collect/stop.sh index 8969195..a7a0a5a 100644 --- a/WeBASE-Data-Collect/stop.sh +++ b/WeBASE-Data-Collect/stop.sh @@ -4,7 +4,7 @@ APP_MAIN=com.webank.webase.data.collect.Application CURRENT_DIR=$(pwd)/ CONF_DIR=${CURRENT_DIR}conf -SERVER_PORT=$(cat $CONF_DIR/application.yml| grep "port" | awk '{print $2}'| sed 's/\r//') +SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured" exit -1 diff --git a/WeBASE-Data-Fetcher/start.sh b/WeBASE-Data-Fetcher/start.sh index fcedf24..d494d93 100644 --- a/WeBASE-Data-Fetcher/start.sh +++ b/WeBASE-Data-Fetcher/start.sh @@ -6,7 +6,7 @@ CURRENT_DIR=$(pwd)/ LOG_DIR=${CURRENT_DIR}log CONF_DIR=${CURRENT_DIR}conf -SERVER_PORT=$(cat $CONF_DIR/application.yml| grep "port" | awk '{print $2}'| sed 's/\r//') +SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured" exit -1 diff --git a/WeBASE-Data-Fetcher/status.sh b/WeBASE-Data-Fetcher/status.sh index 6ec0f9c..37cf431 100644 --- a/WeBASE-Data-Fetcher/status.sh +++ b/WeBASE-Data-Fetcher/status.sh @@ -4,7 +4,7 @@ APP_MAIN=com.webank.webase.data.fetcher.Application CURRENT_DIR=$(pwd)/ CONF_DIR=${CURRENT_DIR}conf -SERVER_PORT=$(cat $CONF_DIR/application.yml| grep "port" | awk '{print $2}'| sed 's/\r//') +SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured" exit -1 diff --git a/WeBASE-Data-Fetcher/stop.sh b/WeBASE-Data-Fetcher/stop.sh index fd9033e..0c49eb0 100644 --- a/WeBASE-Data-Fetcher/stop.sh +++ b/WeBASE-Data-Fetcher/stop.sh @@ -4,7 +4,7 @@ APP_MAIN=com.webank.webase.data.fetcher.Application CURRENT_DIR=$(pwd)/ CONF_DIR=${CURRENT_DIR}conf -SERVER_PORT=$(cat $CONF_DIR/application.yml| grep "port" | awk '{print $2}'| sed 's/\r//') +SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured" exit -1