Last active
December 17, 2015 10:19
-
-
Save omar-yassin/5593862 to your computer and use it in GitHub Desktop.
Bash/Pushover script to notify current server's WAN ip address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#https://pushover.net/ - try it! | |
server_hostname="something" | |
ip="`curl -s checkip.dyndns.com | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"`" | |
curl -s \ | |
-F "token=app.token.key" \ | |
-F "user=user.key" \ | |
-F "message=$server_hostname IP is $ip" \ | |
https://api.pushover.net/1/messages.json > /dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment