#!/bin/bash _IP=`curl -s api.ipify.org` echo $_IP > /tmp/my_ip if [[ $_IP =~ <%= @proto_pub_ip_regex %> ]] ;then _IP=`curl -s 10.0.200.100/ip.sh` echo $_IP >> /tmp/my_ip fi hostname -I | tr " " "\n" >> /tmp/my_ip