#!/bin/sh cd /home/mrtg umask 002 # Read the traffic data in from the (root only) /proc/net/ip_fwchains file source/fw > iptables_list # Read the smart stats source/sd a > sd_list_a source/sd b > sd_list_b source/sd c > sd_list_c source/sd d > sd_list_d /usr/bin/mrtg /home/mrtg/mrtg.cfg # Make an archive cd /var/ftp/pub/graphs tar cfz /home/mrtg/archives/`date +"%Y-%U"`.tgz *.log