#!/bin/sh -e
CRON=false
MAILTO=root
confdir="/etc/fwanalog/fwanalog.opts"
fwanalog="/usr/sbin/fwanalog"

# check if this script will run on a debian system and load 
# right debconf values 

if [ -f /etc/debian_version ];then 
	if [ -f /etc/default/fwanalog ];then
		. /etc/default/fwanalog
	fi
fi
	
if [ "$CRON" = "true" ];then
        test -x $fwanalog && $fwanalog -t >/dev/null 2>&1

	if [ -f $confdir ]; then
		. $confdir
		test -n "$MAILTO" && test -n "$outdir" && cat "$outdir/today.txt"
	fi

	test -x $fwanalog && $fwanalog &>/dev/null
fi

