Created
December 30, 2008 16:25
-
-
Save jzawodn/41653 to your computer and use it in GitHub Desktop.
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 | |
T_USER=twitter_username | |
T_PASS=twitter_password | |
T_URL=http://twitter.com/statuses/update.xml | |
cd $HOME | |
LAST_IP=`cat .last_ip` | |
IP=`curl -s -o - http://jeremy.zawodny.com/ip.php` | |
if [ $LAST_IP != $IP ]; | |
then | |
# echo "new ip: $IP" | |
curl -s -o /dev/null -u $T_USER:$T_PASS -d status="$IP" $T_URL | |
echo "$IP" > .last_ip | |
else | |
# echo "ip unchanged" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment