#!/bin/ksh ##################################################################### # File: security_patch_chk # # Crontab entry: # # Run Security Patch Check and email the goodies to root. # 0 1 * * 1 /usr/local/bin/security_patch_chk > /dev/null 2>&1 # # Doug Burton - 2/25/2004 - http://web.tampabay.rr.com/batcave ##################################################################### BLAH=/opt/sec_mgmt/spc/bin BLAHTMP=/tmp/security_patches if [[ -a $BLAH/security_patch_check ]] then continue else echo "\n\n $BLAH/security_patch_check *** NOT *** found.\n\n" | \ mailx -s "Security Patch Check for `hostname`" root exit fi if [[ -d $BLAHTMP ]] then continue else mkdir $BLAHTMP fi cd $BLAH $BLAH/security_patch_check -r | tee $BLAHTMP/stuff echo "\n\n############################################################################### ############################################################################### ############################################################################### ###############################################################################\n\n" >> $BLAHTMP/stuff $BLAH/security_patch_check -m -c $BLAH/security_catalog | tee -a $BLAHTMP/stuff cat $BLAHTMP/stuff | mailx -s "Security Patch Check for `hostname`" root rm $BLAHTMP/stuff