NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

help with an audit-packages shell script



I want a shell script that I can cron.  I want this script to do an
audit-packages and send me an email if there is anything that needs
patching.  The script below works, except that it sends the email even
if audit-packages returns nothing.

Can anyone improve it?  the last two lines should be one line
thanks, Philip


#!/bin/sh
/usr/pkg/sbin/download-vulnerability-list
/usr/pkg/sbin/audit-packages > /root/auditpackages.txt
(echo "Subject: Audit Packages Output";cat
/root/auditpackages.txt)|/usr/sbin/sendmail me%example.com@localhost



Home | Main Index | Thread Index | Old Index