Skip to content

Instantly share code, notes, and snippets.

@SchaeStewart
Last active January 4, 2017 15:22
Show Gist options
  • Save SchaeStewart/4d83ba2402c7078cc2e31edf62aeec56 to your computer and use it in GitHub Desktop.
Save SchaeStewart/4d83ba2402c7078cc2e31edf62aeec56 to your computer and use it in GitHub Desktop.
Mails IP Address
#!/bin/bash
#Cron command Runs every 4 hours
#0 0 0/4 1/1 * ? *
ip="$(curl -s icanhazip.com/s)"
echo "$ip" | mail -s "IP Address Dogsoft.me" myemail@domain.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment