Support new output format of 'ifconfig'-command.

This commit is contained in:
Christoph 2017-07-03 01:02:47 +02:00
parent c74c424481
commit 4d069c8696

View File

@ -165,8 +165,13 @@ _major_php_verisons=`echo "$__major_php_verisons" | sed 's/^ *//'`
# - Determin IP Addresses # - Determin IP Addresses
# - # -
__ipv4="`ifconfig | grep -e \"^\s*inet Adresse\" | grep -v \"127.0.0.1\" | awk '{print$2}' | cut -d\":\" -f2 | sort | head -1`" if ifconfig | grep -i -q -E "inet [address|Adresse]:" ; then
__ipv6="`ifconfig | grep -e \"^\s*inet6-Adresse\" | awk '{print$2}' | grep -v -e \"^::1/\" | grep -v -e \"^fe80\" | cut -d\"/\" -f1 | sort | head -1`" __ipv4="`ifconfig | grep -e \"^\s*inet Adresse\" | grep -v \"127.0.0.1\" | awk '{print$2}' | cut -d\":\" -f2 | sort | head -1`"
__ipv6="`ifconfig | grep -e \"^\s*inet6-Adresse\" | awk '{print$2}' | grep -v -e \"^::1/\" | grep -v -e \"^fe80\" | cut -d\"/\" -f1 | sort | head -1`"
else
__ipv4="`ifconfig | grep -e \"^\s*inet \" | grep -v \"127.0.0.1\" | awk '{print$2}' | sort | head -1`"
__ipv6="`ifconfig | grep -e \"^\s*inet6 \" | awk '{print$2}' | grep -v \"^::1\" | grep -v -e \"^fe80\" | sort | head -1`"
fi
# - Determin httpd binary # - Determin httpd binary
# - # -