You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/03/21 12:01:15 UTC

[incubator-inlong] branch master updated: [INLONG-3271][Agent] Agent docker.sh cannot get localip (#3272)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new c5acfaf  [INLONG-3271][Agent] Agent docker.sh cannot get localip (#3272)
c5acfaf is described below

commit c5acfaf2dcfd8ce6874f8fd736d8ed380641b612
Author: Schnapps <zp...@connect.ust.hk>
AuthorDate: Mon Mar 21 20:01:10 2022 +0800

    [INLONG-3271][Agent] Agent docker.sh cannot get localip (#3272)
---
 inlong-agent/agent-docker/agent-docker.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inlong-agent/agent-docker/agent-docker.sh b/inlong-agent/agent-docker/agent-docker.sh
index 3fbe910..d16cb1b 100644
--- a/inlong-agent/agent-docker/agent-docker.sh
+++ b/inlong-agent/agent-docker/agent-docker.sh
@@ -17,7 +17,7 @@
 #
 
 file_path=$(cd "$(dirname "$0")"/../;pwd)
-local_ip=$(ifconfig $ETH_NETWORK | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}')
+local_ip=$(ifconfig $ETH_NETWORK | grep "inet" | grep -v "inet6" | awk '{print $2}')
 # config
 cat <<EOF > ${file_path}/conf/agent.properties
 agent.fetcher.classname=org.apache.inlong.agent.plugin.fetcher.ManagerFetcher