Skip to content

Instantly share code, notes, and snippets.

@H3wastooshort
Created January 29, 2019 15:15
Show Gist options
  • Save H3wastooshort/1a6af57df3e9e6d052ac521b9c99c680 to your computer and use it in GitHub Desktop.
Save H3wastooshort/1a6af57df3e9e6d052ac521b9c99c680 to your computer and use it in GitHub Desktop.
uploads a pic every minute
#!/bin/bash
HOST='webcam.wunderground.com'
USER='WU_8595713CAM1'
PASSWD='NOT UR PW!!'
FILE='/tmp/camsnap.jpg'
fswebcam -r 640x480 --jpeg 50 $FILE
#FILE=`ls -lt *snapshot.jpg | head -1 | awk '{print $9}'`
#echo "file is $FILE"
/usr/bin/ftp -n -v $HOST << END_SCRIPT
user $USER $PASSWD
put $FILE image.jpg
quit
END_SCRIPT
rm $FILE
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment