diff --git a/create_vhost_php.sh b/create_vhost_php.sh index a211fe4..59913e6 100755 --- a/create_vhost_php.sh +++ b/create_vhost_php.sh @@ -165,8 +165,13 @@ _major_php_verisons=`echo "$__major_php_verisons" | sed 's/^ *//'` # - 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`" -__ipv6="`ifconfig | grep -e \"^\s*inet6-Adresse\" | awk '{print$2}' | grep -v -e \"^::1/\" | grep -v -e \"^fe80\" | cut -d\"/\" -f1 | sort | head -1`" +if ifconfig | grep -i -q -E "inet [address|Adresse]:" ; then + __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 # -