- Joined
- Oct 29, 2005
- Messages
- 21,124
- Likes received
- 5,496
- Thanks received
- 1,575
I'm thinking of taking up thievery as a career then!
Come on, who lives where and what have you got?
I live in Donacaster and I have a time machine.
Threaded.
I'm thinking of taking up thievery as a career then!
Come on, who lives where and what have you got?
)MYIP=`curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.\.]*\).*/\1/g'`
echo $MYIP



than anything else. For some reason Dropbox doesn't seem to sync when started this way.#!/bin/bash
myuser="pondy"
mydir=/Users/$myuser/Dropbox/stolen
myarc=/Users/$myuser/Documents/archive
mydate=$(date +"%d-%b-%y-%H-%M")
# Find out console User
localuser=`who | grep console`
consoleusr=${localuser%% *}
if [[ -n $consoleusr ]]
then
echo $consoleusr-is-here
if [[ $consoleusr != $myuser ]]
then
echo "User not $myuser"
# Mute, take snapshot and screengrap then put vol back
curvol=`osascript -e "output volume of (get volume settings)"`
osascript -e "set volume output volume 0"
/Users/$myuser/Dropbox/Imagesnap/imagesnap $mydir/$mydate.img.jpg
Screencapture -S $mydir/$mydate.scrn.jpg
osascript -e "set volume output volume $curvol"
# Check for WAN connection
myip=`curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.\.]*\).*/\1/g'`
echo "checking IP"
if [ $myip ]
# Write external IP add
then echo $myip-at-$mydate-by-$consoleusr+$dropcheck >> $mydir/myip.txt
echo $myip
#ftp files to home
su $myuser -c "/Users/$myuser/scripts/mysftp.sh $mydir"
mv $mydir/*.jpg $myarc/
# Check if Dropbox is running
dropcheck=`ps -A | grep Dropbox.app`
grepdropcheck=`echo $dropcheck | grep MacOS`
# Start Dropb box if not running
if [[ $grepdropcheck ]]
then
echo "Dropbox is running"
else
echo "No dropbox found... Starting Dropbox..."
su $myuser -c "/Applications/Dropbox.app/Contents/MacOS/Dropbox &"
fi
else
echo "no ip"
echo NoIP-at-$mydate-by+$consoleusr >> $mydir/myip.txt
fi
fi
else
echo "Noone at console"
fi