Explorar o código

Update rebuild-wekan.sh to use local network IP address.

Thanks to xet7 !
Lauri Ojansivu %!s(int64=2) %!d(string=hai) anos
pai
achega
6479c6a5c5
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      rebuild-wekan.sh

+ 2 - 2
rebuild-wekan.sh

@@ -146,9 +146,9 @@ do
 
 
     "Run Meteor for dev on http://CURRENT-IP-ADDRESS:4000")
     "Run Meteor for dev on http://CURRENT-IP-ADDRESS:4000")
 		if [[ "$OSTYPE" == "darwin"* ]]; then
 		if [[ "$OSTYPE" == "darwin"* ]]; then
-		  IPADDRESS=$(ifconfig | grep broadcast | grep 'inet ' | cut -d: -f2 | awk '{ print $2}' | cut -d '/' -f 1)
+		  IPADDRESS=$(ifconfig | grep broadcast | grep 'inet ' | cut -d: -f2 | awk '{ print $2}' | cut -d '/' -f 1 | grep '192.')
 		else
 		else
-		  IPADDRESS=$(ip a | grep 'noprefixroute' | grep 'inet ' | cut -d: -f2 | awk '{ print $2}' | cut -d '/' -f 1)
+		  IPADDRESS=$(ip a | grep 'noprefixroute' | grep 'inet ' | cut -d: -f2 | awk '{ print $2}' | cut -d '/' -f 1 | grep '192.')
 		fi
 		fi
 		echo "Your IP address is $IPADDRESS"
 		echo "Your IP address is $IPADDRESS"
 		#---------------------------------------------------------------------
 		#---------------------------------------------------------------------