Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
Repair the bug that two ips are gotten instead of one.
  • Loading branch information
5herhom authored and peacewong committed May 20, 2020
1 parent 6294ec9 commit b48434a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b48434a

Please sign in to comment.