#!/bin/sh rrdtool graph "$graph.tmp" \ \ --imgformat PNG \ \ --width "$width" \ --height "$height" \ \ --start end-1d \ --end "$end" \ \ --title "end = $end" \ --vertical-label '°C' \ \ --units-exponent 0 \ --units-length 0 \ \ --x-grid 'MINUTE:30:HOUR:2:HOUR:4:0:%R' \ \ --slope-mode \ --interlaced \ --alt-y-grid \ \ "DEF:temp=$rrd:temp:AVERAGE" \ "DEF:temp_cf_min=$rrd:temp:MIN" \ "DEF:temp_cf_max=$rrd:temp:MAX" \ \ 'VDEF:temp_min=temp_cf_min,MINIMUM' \ 'VDEF:temp_max=temp_cf_max,MAXIMUM' \ 'VDEF:temp_avg=temp,AVERAGE' \ 'VDEF:temp_last=temp,LAST' \ \ 'COMMENT:\s' \ 'COMMENT:\s' \ 'COMMENT:\s' \ 'COMMENT: Min Max Avg Last\n' \ 'COMMENT:\s' \ \ "LINE1.7:temp#$today:out " \ 'GPRINT:temp_min:%6.1lf' \ 'GPRINT:temp_max:%6.1lf' \ 'GPRINT:temp_avg:%6.1lf' \ 'GPRINT:temp_last:%6.1lf\n' \ \ "COMMENT: `date '+%F %H\:%M\:%S'`" \ \ > /dev/null && \ \ mv "$graph.tmp" "$graph" || \ exit 1