[TriLUG] bash script, motion, scp

James Tuttle jjtuttle at trilug.org
Fri Jan 11 13:05:08 EST 2008


I saw that camera and thought it would be great, but I doubt my wife
would be interested in paying for it.

The first thing my wife had to say about the webcam in the window was
"Don't you think they'll steal your computer?"  I'd like to hide it and
will start playing with it this weekend.  I have no idea how to begin,
though.

Any ideas?  There aren't many possible locations to place the camera so
I'll have to try to disguise it.

Jim

Scott Lambdin wrote:
> Good luck.  Are you going to hide the camera or make it obvious?
> 
> Someone had a real nice camera for sale on here a while back.
> 
> 
> On 1/11/08, James Tuttle <jjtuttle at trilug.org> wrote:
>> Scott,
>>
>> You were spot on.  I didn't catch that so I really appreciate your help.
>> There have been some burglaries in my neighborhood and someone has been
>> prowling on my screen porch.  I'd love to have a picture of them.  Now
>> if I only had a better camera than this Logitech Messenger.
>>
>> Thanks again,
>> Jim
>>
>>
>> Scott Lambdin wrote:
>>> Hmm - it looks like some version put the filename at the end without
>> %f  -
>>> see what $2 is in your bash script.
>>>
>>> On 1/11/08, James Tuttle <jjtuttle at trilug.org> wrote:
>>>> Hi,
>>>>
>>>> I'm working on my motion configuration.  Motion allows an
>>>> on_picture_save option.  Many people use wput to ftp the picture to a
>>>> remote server, but I couldn't get that to work and I don't care for
>>>> plain text authentication.
>>>>
>>>> I'd like to use scp.  In my motion.conf file I have this line:
>>>> on_picture_save /home/jjtuttle/.motion/onsave.sh %f
>>>> %f should expand to the to filename of the saved picture.
>>>>
>>>> My onsave.sh file reads thusly:
>>>> #/bin/bash
>>>>
>>>> scp $1 jim at bt:~/www/private/motion/.
>>>> echo "SCP'd $1 to bt"
>>>>
>>>> However, the %f doesn't seem to be expanding.  I get this error:
>>>> [1] File of type 2 saved to:
>>>> /home/jim/Documents/personal/motion/01-20080111110000-snapshot.jpg
>>>> %f: No such file or directory
>>>> SCP'd %f to Braggtown
>>>>
>>>> So, my question is, how can I use SCP to save this picture to a remote
>>>> location.  I suppose I could trigger a script that finds the most
>> recent
>>>> image in the directory and SCP's that, but during a motion capture
>>>> event pictures are saved pretty quickly and I wonder if I'd miss some.
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,
>>>> Jim
>>>> --
>>>> --
>>>> ---Jim Tuttle
>>>> ------------------------------------------------------
>>>> http://www.braggtown.com
>>>> PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x69B69B08
>>>>
>>>> --
>>>> TriLUG mailing list        :
>> http://www.trilug.org/mailman/listinfo/trilug
>>>> TriLUG Organizational FAQ  : http://trilug.org/faq/
>>>> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>>>>
>>
>> --
>> --
>> ---Jim Tuttle
>> ------------------------------------------------------
>> http://www.braggtown.com
>> PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x69B69B08
>>
>> --
>> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
>> TriLUG Organizational FAQ  : http://trilug.org/faq/
>> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>>


-- 
--
---Jim Tuttle
------------------------------------------------------
http://www.braggtown.com
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x69B69B08




More information about the TriLUG mailing list