Added getip.sh modifications from swift3bold