send headers at the end, after generating images
[vaillant-thermostat] / temp.sh
1 #!/bin/sh -x
2
3 # install as cgi-script and invoke to get png
4
5 #ssh rpi 'cat `ls -t /dev/shm/vaillant.* | head -1` | sed "s/  .*| */ /"' > /dev/shm/temp.tsv
6 tail -4320 `ls -t /dev/shm/vaillant.* | head -1` | sed "s/  .*| */ /" > /dev/shm/temp.tsv
7 cd /home/pi/vaillant-thermostat/
8 gnuplot temp.gnuplot
9 montage /dev/shm/[1-3].png -tile 1x3 -geometry +0+0 /tmp/m1.png
10 #convert /tmp/m1.png -gravity center -extent 600x800 /tmp/m1.pgm
11 convert /tmp/m1.png -gravity center -extent 600x800 -colorspace Gray /tmp/m1.gray.png
12 #display /tmp/m1.pgm
13
14 echo Location: http://192.168.3.2/m1.gray.png
15 echo
16