LinuxCrazy Webcam

Wow this was kind of hard for me to get to work. I am sure there is an easier way but here is how I did it. The first problem I ran in to was I could not get figure out how to get ftp to overwrite each new photo that was uploaded. What I did was use curl.

curl -T /root/Webcam_Pictures/Webcam.jpeg ftp://dwabbott.com --user user:password

Had to be root, put that in a file as a bash script and set up a crontab to run every 30 min. Next I had to go to the web server and move the file to where drupal could find it. Did the same thing on that end with a crontab with this;

mv -f /root/Webcam.jpeg  /var/www/localhost/htdocs/pictures/

Found out I can do it in one shot !

curl -T /root/Webcam_Pictures/Webcam.jpeg ftp://dwabbott.com//filename --user user:password

UPDATE

I now just use Camorama to upload the file and created a file move_file;

#!/bin/bash
mv -f /root/Webcam.jpeg /var/www/localhost/htdocs/pictures

And run that as a cron every 30 min.

Another Update

Put the webcam on the web server and run this as a cron:

streamer -c /dev/video0 -b 16 -o /var/www/localhost/htdocs/pictures/Webcam.jpeg