Skip to content

Instantly share code, notes, and snippets.

@zomux
Created July 17, 2015 00:49
Show Gist options
  • Save zomux/58db49f152d52f325cd8 to your computer and use it in GitHub Desktop.
Save zomux/58db49f152d52f325cd8 to your computer and use it in GitHub Desktop.
#!/bin/sh
MAIL_BIN="/usr/sbin/sendmail"
MAIL_FROM="[email protected]"
MAIL_ADDR="[email protected]"
report() {
CMD="curl http://169.254.169.254/latest/meta-data/public-ipv4"
ip=`$CMD`
echo $ip > /tmp/new_aws_machine_ip_.txt
/usr/local/bin/gist /tmp/new_aws_machine_ip_.txt
}
report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment