I have put this little script in an audit.sh file, and then set a
crontab to run the file every 24 hrs.
the contents of the script is

#!/bin/sh
/usr/pkg/sbin/download-vulnerability-list
/usr/pkg/sbin/audit-packages > /root/auditpackages.txt
if [ -s /root/auditpackages.txt ]; then (echo "Subject: Audit Packages 
Output";cat /root/auditpackages.txt)|/usr/sbin/sendmail -r hostname 
[email protected]
fi

it relies on the fact that if there are no vulnerabilities then the output of 
audit-packages is nothing, so it only sends an email if there is a problem.

Anyone know how to do a similar thing with freebsd ?

regards, Philip


_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to