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

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2023-06-16 12:22:18 +03:00
parent a1ddf8e6d2
commit 6479c6a5c5

View file

@ -146,9 +146,9 @@ do
"Run Meteor for dev on http://CURRENT-IP-ADDRESS:4000")
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
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
echo "Your IP address is $IPADDRESS"
#---------------------------------------------------------------------