service manager not gets IP addy from hostname rather than ifconfig

Former-commit-id: 8fdd97e7b4
This commit is contained in:
mjames-upc 2015-02-17 13:38:37 -07:00
parent e22486eaae
commit 3170e14759

View file

@ -50,7 +50,8 @@ nopts=${options[@]}
# OS X
#IP=`ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'`
# Linux
IP=`/sbin/ifconfig | grep "inet addr" | grep -v 127.0.0 | awk '{ print $2 }' | cut -d: -f2`
#IP=`/sbin/ifconfig | grep "inet addr" | grep -v 127.0.0 | awk '{ print $2 }' | cut -d: -f2`
IP=`hostname -I`
# truncate
IP_CIDR="${IP%.*}"