summaryrefslogtreecommitdiff
path: root/scripts/temperaturescript.sh
blob: 4186b2716892d8ed5464d439994106a3f20c96af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#/bin/bash
#script to fetch latest temperature graph and resize it.


URL="http://taifun.local.sublab.org/temperature/temp-2hour.png"
WEBPATH=../

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 -contrast ${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