View difference between Paste ID: tPiD7LrG and 51VVpaME
SHOW: | | - or go back to the newest paste.
1
#!/bin/bash
2
USERNAME="xxxxxxx"
3
PASSWORD="xxxxxxx"
4
5
uptime=$(</proc/uptime)
6
uptime=${uptime%%.*}
7
seconds=$(( uptime%60 ))
8
minutes=$(( uptime/60%60 ))
9
hours=$(( uptime/60/60%24 ))
10
days=$(( uptime/60/60/24 ))
11
12
URL=http://api.supertweet.net/1/statuses/update.xml
13
echo $UPTIME
14
# Post to Twitter.
15
16
message="$days days, $hours hours, $minutes minutes, $seconds seconds"
17
18
result=`curl -u $USERNAME:$PASSWORD -d status="[Raspi Uptime] MEGATRON has a total uptime of $message #Raspi" $URL`
19-
result=`curl -u $USERNAME:$PASSWORD -d status="[Raspi Uptime] MEGATRON has a to$
19+
20
exit 0