#!/bin/sh
echo "Content-type: image/png"
echo
D=/var/log/arexxd
exec rrdtool graph - \
	--start 'now-30d' \
	--end 'now' \
	--title "Relative Humidity: MIN and MAX" \
	-w 720 -h 600 \
	-x DAY:1:DAY:5:DAY:5:0:%d:%m \
	-y 5:2 \
	--right-axis 1:0 --right-axis-format "%3.0lf" \
	--legend-position east \
	--units-exponent 0 --lower-limit 0 --upper-limit 100 --rigid \
	DEF:alo=$D/sensor-catarium-rh.rrd:rh:MIN 'LINE1:alo#cc0000:Catarium' \
	DEF:ahi=$D/sensor-catarium-rh.rrd:rh:MAX 'LINE1:ahi#cc0000'