From b48434a3a034459bf7c3ee7c6175c5a74aecdc3a Mon Sep 17 00:00:00 2001 From: 5herhom <35916131+5herhom@users.noreply.github.com> Date: Tue, 18 Feb 2020 14:05:30 +0800 Subject: [PATCH] Update install.sh Repair the bug that two ips are gotten instead of one. --- bin/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install.sh b/bin/install.sh index 674163f2ee..e28a53d042 100644 --- a/bin/install.sh +++ b/bin/install.sh @@ -130,7 +130,7 @@ isSuccess "load config" local_host="`hostname --fqdn`" -ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}') +ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}'|awk 'NR==1') function isLocal(){ if [ "$1" == "127.0.0.1" ];then