#!/bin/sh
if [ -f "/usr/local/sbin/tripwire" ] ; then
	if [ !  -f "/var/db/tripwire/$(hostname).twd" ] ; then
		eval "/usr/local/sbin/tripwire --init -P FreeBSD "
	 	if [ $? -ne 0 ] ; then
                	echo "Error: Baseline Database  generation failed"
                	exit 1
        	fi
	
        fi
 
	 eval "/usr/local/sbin/tripwire --check --no-tty-output " 	
else
	echo " Tripwire is not installed at your system or is not properly installed "
fi 
 
