Source

snapshot / snapshot

#!/bin/sh
#################################
# Take a snapshot on all webcams
# - Charles Hooper <chooper@plumata.com>

. ./secrets

CAMLIST=`ls /dev/video*`
TODAY=`date +%Y%m%d.%H%M`
PREFIX="/srv/snapshots"

mkdir -p "$PREFIX"

for CAM in $CAMLIST
do
    FRIENDLYNAME=`echo $CAM | sed -e 's!/dev/!!'`
    echo "Taking snapshot from $CAM"
    streamer -c "$CAM" -b 32 -o "$PREFIX/$TODAY-$FRIENDLYNAME.jpeg"
done

#python thirdparty/uploadr.py/uploadr/uploadr.py
./simpleuploadr.py