From 7adbb4c5a8cbc99c8ee1ed2cb9b83c185fdc964f Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 14 Dec 2011 19:42:31 +0100 Subject: added script for fetching and resizing tempgraphs --- scripts/temperaturescript.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/temperaturescript.sh diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh new file mode 100644 index 0000000..1e38473 --- /dev/null +++ b/scripts/temperaturescript.sh @@ -0,0 +1,20 @@ +#/bin/bash +#script to fetch latest temperature graph and resize it. + +. settings + +URL="http://taifun.local.sublab.org/temperature/temp-2hour.png" + +wget ${URL} -O ${WEBPATH}/public/img/buffer.tempgraph.png &> /dev/null || exit 1 + +cp ${WEBPATH}/public/img/buffer.tempgraph.png ${WEBPATH}/public/img/buffer.thumb.tempgraph.png + +mogrify -crop 800x400+70+41 -resize 200x50 ${WEBPATH}/public/img/buffer.thumb.tempgraph.png + +mv -f ${WEBPATH}/public/img/buffer.tempgraph.png ${WEBPATH}/public/img/tempgraph.png &> /dev/null + +mv -f ${WEBPATH}/public/img/buffer.thumb.tempgraph.png ${WEBPATH}/public/img/thumb.tempgraph.png &> /dev/null + + + + -- cgit v1.2.1