#!/bin/sh

text=`curl -L -s http://router.home/graphs/iface/upstream/ | grep Current | head -2 | awk '{print $12}' | sed -e 's/\;//'`
in=`echo "$text" | head -1`
out=`echo "$text" | tail -1`

wget -O daily.gif --quiet http://router.home/graphs/iface/upstream/daily.gif
convert -crop 128x128+362+23 daily.gif -rotate 180 -fill black -opaque white -flop -type truecolor crop.bmp
./bmp.py crop.bmp $in $out
