service manager not gets IP addy from hostname rather than ifconfig
Former-commit-id: 8fdd97e7b4
This commit is contained in:
parent
e22486eaae
commit
3170e14759
1 changed files with 2 additions and 1 deletions
|
@ -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%.*}"
|
||||
|
|
Loading…
Add table
Reference in a new issue