#!/bin/sh
test -f /proc/net/ip_tables_names && test -f /etc/ipac-ng/ipac.conf && test -f /usr/sbin/fetchipac && test -f /usr/sbin/ipacsum|| exit 0

# traffic use from last month mailed to root
/usr/bin/nice /usr/sbin/ipacsum --fixed-quantity K --replace --timeframe "last month"|mail -s "monthly trafficreport in kb, `date -d month+ago  +%Y-%B`" root
