rm -rf $1/*.rrd for i in $1/*.xml; do rrdtool restore "$i" "${i%.xml}"; done chown -R apache:nobody $1 mrtg1 $1