#!/bin/bash

server='cloudbox'
localStore='/home/pgadey/cam'
remoteStore='/home/pgadey/public_html/office/cam'
fileName=`date +%F+%T`.jpeg


streamer -o $localStore/$fileName -j 100 -s 1280x720 
scp $localStore/$fileName $server:$remoteStore/$fileName 

ssh $server "mogrify -verbose -sharpen 0x1.5 $remoteStore/$fileName"
ssh $server "mogrify -verbose -thumbnail 127x72 -path $remoteStore/thumbs $remoteStore/$fileName"
#ssh $server "mogrify -verbose -monochrome -thumbnail 128x72 -path $remoteStore/thumbs/ $remoteStore/$fileName"
