diff options
author | Christian Franke <nobody@nowhere.ws> | 2011-04-06 07:14:41 +0200 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2011-04-06 07:14:41 +0200 |
commit | f9897bf04125d9877f182a34c5bc09dae7fd8088 (patch) | |
tree | 35debb14ca3a5df2851023f66820e7af8f152230 /scripts/webcamscript | |
parent | 65f1a7778b4611097c2b11b886b7f8ab1197aebd (diff) |
Rework camscripts, add dachcam
Diffstat (limited to 'scripts/webcamscript')
-rw-r--r--[-rwxr-xr-x] | scripts/webcamscript | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/scripts/webcamscript b/scripts/webcamscript index c48a0a2..9b61eb3 100755..100644 --- a/scripts/webcamscript +++ b/scripts/webcamscript @@ -5,16 +5,18 @@ TODAY=`date` TIME=`date +"%H"` -wget http://taifun.local.sublab.org/webcam.jpg -O ${WEBPATH}/public/img/buffer.rack.webcam.jpg &> /dev/null || exit 1 +wget "${URL}" -O ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg &> /dev/null || exit 1 -cp ${WEBPATH}/public/img/buffer.rack.webcam.jpg ${WEBPATH}/public/img/buffer.thumb.rack.webcam.jpg -mogrify -resize 200x150 ${WEBPATH}/public/img/buffer.thumb.rack.webcam.jpg -if [ $TIME -lt 6 ] || [ $TIME -ge 18 ]; then - mogrify -fill white -gravity SouthEast -draw "text 10,10 '${TODAY}'" ${WEBPATH}/public/img/buffer.rack.webcam.jpg -else - mogrify -fill black -gravity SouthEast -draw "text 10,10 '${TODAY}'" ${WEBPATH}/public/img/buffer.rack.webcam.jpg +cp ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg ${WEBPATH}/public/img/buffer.thumb.${NAME}.webcam.jpg +mogrify -resize 200x150 ${WEBPATH}/public/img/buffer.thumb.${NAME}.webcam.jpg +if [ x"${TIMESTAMP}" == x"yes" ]; then + if [ $TIME -lt 6 ] || [ $TIME -ge 18 ]; then + mogrify -fill white -gravity SouthEast -draw "text 10,10 '${TODAY}'" ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg + else + mogrify -fill black -gravity SouthEast -draw "text 10,10 '${TODAY}'" ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg + fi fi -mv -f ${WEBPATH}/public/img/buffer.rack.webcam.jpg ${WEBPATH}/public/img/rack.webcam.jpg &> /dev/null -mv -f ${WEBPATH}/public/img/buffer.thumb.rack.webcam.jpg ${WEBPATH}/public/img/thumb.rack.webcam.jpg &> /dev/null +mv -f ${WEBPATH}/public/img/buffer.${NAME}.webcam.jpg ${WEBPATH}/public/img/${NAME}.webcam.jpg &> /dev/null +mv -f ${WEBPATH}/public/img/buffer.thumb.${NAME}.webcam.jpg ${WEBPATH}/public/img/thumb.${NAME}.webcam.jpg &> /dev/null exit 0 |