Created
November 3, 2016 12:26
-
-
Save seiketkm/fa1fcc999e860c4e2c4476d94dcda544 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/sh | |
# | |
TWEET=$(echo "$*"|cut -c -140) | |
curl -X POST --silent --data "_t=${STREWGATE_TOKEN}" --data-urlencode "msg=${TWEET}" http://stewgate-u.appspot.com/api/post/ > /dev/null |
tweetmyips on boot
#/bin/sh
sleep 10
GIP=`curl --silent http://ieserver.net/ipcheck.shtml`
LIP=$(hostname -I) || true
NOW=`date +%H:%M:%S`
. /etc/environment
TWEET="LocalIPaddr=${LIP} GlobalIP=${GIP} ${NOW}"
curl -X POST --silent --data "_t=${STREWGATE_TOKEN}" --data-urlencode "msg=${TWEET}" http://stewgate-u.appspot.com/api/post/ > /dev/null
and
/etc/network/interfaces
up /home/pi/bin/tweetmyips
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in /etc/environment, .bash_profile, .bashrc or etc.