Skip to content

Commit

Permalink
Use "hostname -I" for ip address detection
Browse files Browse the repository at this point in the history
  • Loading branch information
njam committed Apr 9, 2014
1 parent 5c926ba commit aa75169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/landrush/cap/linux/read_host_visible_ip_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def self.read_host_visible_ip_address(machine)
end

def self.command
%Q(ip addr show | awk '$1=="inet" {print $2}' | cut -f1 -d'/' | tail -n1)
%Q(hostname -I | awk -F' ' '{print $NF}')
end
end
end
Expand Down

0 comments on commit aa75169

Please sign in to comment.