jzawodn (owner)

Revisions

gist: 41653 Download_button fork
public
Public Clone URL: git://gist.github.com/41653.git
Embed All Files: show embed
twitter_ip.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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