#!/bin/sh rrdtool graph "$graph.tmp" \ \ --imgformat PNG \ \ --width "$width" \ --height "$height" \ \ --start end-1d \ --end now \ \ --title 'One day' \ --vertical-label '°C' \ \ --units-exponent 0 \ --units-length "$units_length" \ \ --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' \ \ "LINE2:temp#$today:Today " \ 'GPRINT:temp_min:%6.1lf' \ 'GPRINT:temp_max:%6.1lf' \ 'GPRINT:temp_avg:%6.1lf' \ 'GPRINT:temp_last:%6.1lf\n' \ \ "COMMENT: `date '+%Y-%m-%d %H\:%M\:%S GMT%z/%Z'`" \ \ > /dev/null && \ \ mv "$graph.tmp" "$graph" || \ exit 1