#!/bin/bash 
#############################################
## CheckPoint B2B emailer
## Written by Michael LaSalvia
## Make sure you edit this to match your enviroment
##
##############################################

## Variables
	mPath=/home/user/vpn
	mRec=user@domain.com
	mBody=/home/user/vpn/body.txt
	mSub="CheckPoint B2B VPN Audit Report" 

	
## Do not edit below this line
tar -xvf $mPath/*.tar -C $mPath
ls $mPath/mnt/drive1/vpn >> $mPath/reports.txt
for cprep in $(cat $mPath/reports.txt)
	do
		mail -s"$mSub" -a"$mPath/mnt/drive1/vpn/$cprep" $mRec < $mBody
	done
rm -Rf $mPath/mnt
rm -Rf $mPath/reports.txt
rm -f $mPath/*.tar
