diff --git a/servefile b/servefile index 757a013..a689759 100755 --- a/servefile +++ b/servefile @@ -111,7 +111,7 @@ def main(): server.address_family = 10 # print urls with local network adresses print "Some addresses this file will be available under:" - ips = commands.getoutput(r"/sbin/ifconfig |grep 'inet6\?'|grep -v 127.0.0.1|grep -v ' fe80'|grep -v ::1|sed -n 's/.*inet6\?[a-zA-Z: -]\+\([0-9a-fA-F.:]*\).*/\1/p'") + ips = commands.getoutput(r"/bin/ip addr|sed -n -e 's/.*inet6\? \([0-9.a-fA-F:]\+\)\/.*/\1/ p'|grep -v '^fe80\|^127.0.0.1\|^::1'") for ip in ips.split("\n"): if ip.find(":") >= 0: # ipv6