X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsecurity%2Ftell_zooty_our_ip.sh;fp=scripts%2Fsecurity%2Ftell_zooty_our_ip.sh;h=9c5b02a1fe1daddb5fac60d059a079a09a101f41;hb=a554566fc3710cdffa9a829062f33454605a7589;hp=c616a1ab10adab720aae4b47b1abf04890541bc3;hpb=d18cd8304c44b5a0eb7e8d4399685a924c6f51fb;p=feisty_meow.git diff --git a/scripts/security/tell_zooty_our_ip.sh b/scripts/security/tell_zooty_our_ip.sh index c616a1ab..9c5b02a1 100644 --- a/scripts/security/tell_zooty_our_ip.sh +++ b/scripts/security/tell_zooty_our_ip.sh @@ -19,30 +19,24 @@ fi ip_file="$(mktemp ${tempdir}/$(hostname | sed -e "s/\..*$//")_ip.XXXXXX)_${USER}" -# iterate forever, since we want to keep running this. -while true; do +# get live ip address +pushd $tempdir +wget http://automation.whatismyip.com/n09230945.asp -O "$ip_file" - # get live ip address - pushd $tempdir - wget http://automation.whatismyip.com/n09230945.asp -O "$ip_file" +chmod 644 "$ip_file" +my_ip=$(head "$ip_file") - chmod 644 "$ip_file" - my_ip=$(head "$ip_file") +echo "my ip is [$my_ip]" - echo "my ip is [$my_ip]" - - # send the file over to the server. - # note that the local_user here is expected to have a certificate that - # gets us access to the server. this needs to be on the local machine - # for sftp to run without a login prompt. - sudo -u $local_user sftp $username@$server <