| ||||||||
General Mac OS X Discussion General Apple and Mac OS X Discussion
|
| | LinkBack | Thread Tools | Display Modes |
(#11)
|
| Member Posts: 31 Join Date: Aug 2009 Location: austin, tx | ok, figured out my exec permissions... i had to: chmod 755 ~/Dropbox/tracking/tracking.sh chmod 755 ~/Dropbox/tracking/isightcapture i also modified the shell script so that instead of overwriting it would create new files and date-time stamp them. i figure its only like 30k every time it captures and dropbox gives me 2gig, i can run it for a long time and not have to worry. |
| | |
(#12)
|
| Member Posts: 31 Join Date: Aug 2009 Location: austin, tx | well for some reason the cron job does not fire the photo capture or the screen cap [see below]. it does the other text files, but not the photo. if i run the .sh from the command line, it works and does take a photo. so there's something the crontab needs to execute those lines. what am i missing? [i'm new to linux/osx command line] also: add this line to the .sh for a screencap warning: file size is about 250k screencapture -x ~/Dropbox/tracking/output/t${TDATE}_screencap.png |
| | |
(#13)
|
(#14)
|
| Senior Member Posts: 183 Join Date: Jul 2009 Location: Austin, TX | Quote:
Thinking of trying Dropbox? Use this referal link and we'll both get an extra 250MB of storage. | |
| | |
(#15)
|
| Member Posts: 59 Join Date: Aug 2009 | HAHA!! This is awesome, well done dude PlayStation2 SCPH-39001N v7.0 / Seagate 320GB HDLoader 0.8c / Memory Card Exploit (+[__]%) PSP-1001k 98500 5.00 M33-6 2, 8 & 32GB MSPD XBOX 360 Arcade 20GB LiteOn iXtreme 1.6 & Activate.iso Xbox LIVE Status: OK Macbook Pro 2.4 i5 8GB 320GB Mac OS X 10.6.6 Dell Mini 10v 1GB 160GB Mac OS X 10.6.6 & Windows 7 RTM A physicist is just an atom's way of looking at itself. N. Bohr |
| | |
(#16)
|
| Member Posts: 31 Join Date: Aug 2009 Location: austin, tx | FYI the screencap and photo cap do not work with CRON. if you just execute the .sh manually it works, but the cron executes seems to run under slightly different premissions and it doesn't work. the photo cap doesnt even fire and the screencap returns a solid black image. still working on a way to have it execute on a schedule. thinking launchd but i havent explored it yet. |
| | |
(#17)
|
| Junior Member Posts: 2 Join Date: Nov 2009 | I used Lingon to create a launchd job, which will also watch a folder for changes and will only trigger the job when it sees a change. I created an empty folder in my dropbox (where I will upload a blank file if I need to enable tracking) and set the launchd job to run every 5 minutes once triggered. Seems to be working great! |
| | |
(#18)
|
| Junior Member Posts: 2 Join Date: Nov 2009 | edit from my previous post. thought it was working, but checked the console and realized that the script needed a couple of edits. I used Lingon to make a new User Daemon that runs every 5 minutes. The launchd command is: Code: /Users/(osx login name)/Dropbox/tracking/tracking.sh >/dev/null 2>&1 Code: USER_DB=/Users/(osx login name)/Dropbox/tracking
TRACKING_FILE=tracking.txt
TRACKING_ENABLED=$USER_DB/$TRACKING_FILE
TDATE=$(date +%Y%m%d%H%M)
if [ -f $TRACKING_ENABLED ]
then
# Dump IP/Airport info
/sbin/ifconfig > $USER_DB/output/${TDATE}_Ifconfig.txt
curl http://checkip.dyndns.org:8245/ > $USER_DB/output/${TDATE}_IP.txt
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I > $USER_DB/output/${TDATE}_airport.txt
# Say cheese
$USER_DB/isightcapture $USER_DB/output/${TDATE}_photo.jpg
fi This whole thing got me thinking...It would be pretty easy to set up another daemon to basically kill the user account and delete all of my personal files based on the same principal of a file moved into a "watch" folder in my dropbox... |
| | |
(#19)
|
| Junior Member Posts: 2 Join Date: Nov 2009 | buddhaheadster > I'm having a spot of trouble getting the launchd thing to work. Installed Lingon, did this: - created a new user daemon, - named it, - added the /Users/kitten/Dropbox/badger/tracking.sh >/dev/null 2>&1 to ProgramArguments - checked RunAtLoad - changed StartInterval to 300 (5 minutes) Nothing seems to happen, so not sure if I'm missing some settings or something. Do I have to reboot for the job to take effect? When I test your script by running it manually through terminal it works just fine, creating all 5 files (added screenshot), but they don't show up unless I run the file manually. Any suggestions? =) EDIT: I've renamed the folders to something less conspicuous - folder is now /badger/, and script runs if mushroom.txt is present. Also, I've moved the webcam line above the other ones inside the IF statement, seems to make webcam pictures more consistent. Before I moved the line I only got webcam shots on half of the test runs, now it seems to work every time. Still can't get launchd to work, though. |
| | |
(#20)
|
| Senior Member Posts: 154 Join Date: Oct 2009 Location: Pittsburgh, PA | subscribing to topic, im going to try it out tomorrow at work. Apple TV | 160GB | CrystalHD iPhone 4 Powermac G5 Tower | 2x 2.0GHZ | 8GB Ram | 160+250 GB HDD | OS X 10.5.8 Leopard | 24" Acer |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.mydellmini.com/forum/general-mac-os-x-discussion/8714-theft-tracking-method-mini-using-dropbox.html | ||||
| Posted By | For | Type | Date | |
| Hey, Reddit - my wife's Macbook got smash'n'grabbed out of her mom's car two hours ago. Had I installed this script in her Dropbox beforehand, I might well have a picture and IP history of the perpetrator. : gadgets | This thread | Refback | 11-21-2009 05:57 AM | |
Copyright © 2008-2011 MyDellMini.com.








Linear Mode
