Skip to content

Commit 552b610

Browse files
committed
Better way to detect primary ip address
1 parent 24f8707 commit 552b610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if [ $create_docker_machine = "y" ];then
4747
eval "$(docker-machine env dev)"
4848

4949
# Find a better way to retrieve the curent ip
50-
ip=$(ifconfig | grep en2 -A1 | grep "inet " | awk '{print $2}')
50+
ip=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | head -n 1)
5151

5252

5353
grep -q DOCKER-LOCAL-BEGIN /etc/exports

0 commit comments

Comments
 (0)