Change ip detection script to use interface from env variable