[TriLUG] bash script, motion, scp

Matt Pusateri mpusateri at wickedtrails.com
Fri Jan 11 13:21:20 EST 2008


Well if the prowler is a trilugger, then in the spirit of Trilug 
community, Jim should just tell us when he's not going to be home. :)  I 
think anyone of us would let him buy his stuff back when we posted it to 
the list for sale :)

Matt P.

Scott Lambdin wrote:
> Get a wireless camera and afix a damaged looking piece of scrap cable that
> just hangs down a couple of feet.  ^_^
>
> Oh, what if the prowler is a triluger?
>
>
> On 1/11/08, James Tuttle <jjtuttle at trilug.org> wrote:
>   
>> 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
>>
>> --
>> 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/
>>
>>     




More information about the TriLUG mailing list