d1f7e40ebd
- change to always output a valid To: and Subject: line. - To: recipient obtained from $MAILTO (defaults to root). - add date to Subject: line. closes [bin/4526] from Giles Lean <giles@nemeton.com.au> * daily: explicitly print 'Nothing to report' if /etc/security didn't report anything. * crontab: pass output of scripts through sendmail -t instead of
27 lines
438 B
Bash
27 lines
438 B
Bash
#!/bin/sh -
|
|
#
|
|
# $NetBSD: monthly,v 1.7 1998/09/15 05:06:31 lukem Exp $
|
|
# from: @(#)monthly 8.1 (Berkeley) 6/9/93
|
|
#
|
|
|
|
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
|
umask 077
|
|
|
|
if [ -s /etc/monthly.conf ]; then
|
|
. /etc/monthly.conf
|
|
fi
|
|
|
|
host=`hostname`
|
|
date=`date`
|
|
|
|
echo "To: ${MAILTO:-root}"
|
|
echo "Subject: $host monthly output for $date"
|
|
echo ""
|
|
|
|
# echo ""
|
|
# echo "Doing login accounting:"
|
|
# ac -p | sort -nr +1
|
|
|
|
echo "Nothing to do!"
|
|
#echo "."
|