diff --git a/debian/alternc.config b/debian/alternc.config index 695cfb5e..31d55f04 100644 --- a/debian/alternc.config +++ b/debian/alternc.config @@ -89,7 +89,7 @@ MYSQL_MAIL_USER=alternc_user MYSQL_MAIL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `" MYSQL_CLIENT=localhost FQDN="`(cat /etc/mailname 2>/dev/null || hostname -f)|tr '[:upper:]' '[:lower:]'`" -INTERNAL_IP="`env LANG=C /sbin/ifconfig|grep inet | grep -v 127.0.0.1| head -1 | cut -d: -f2 | sed -e 's/\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`" +INTERNAL_IP="`env LANG=C /sbin/ip addr show|grep 'inet ' | grep -v 127.0.0.1| head -1 | sed -e 's/^.*inet \([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`" PUBLIC_IP="$INTERNAL_IP" DEFAULT_MX="`cat /etc/mailname 2>/dev/null || hostname -f`" ALTERNC_HTML="/var/www/alternc/"