[Integrit-users] scripting the e-mail
Brought to you by:
ecashin
From: Scott A. <sco...@ma...> - 2003-08-01 21:45:21
|
I am still having problems with my script for integrit. I am trying to pipe the output from integrit into a text file. Then if the exit code for grep is 1 i want grep to send me an email that tells me whats up...heres how i am trying to do it... /usr/local/sbin/integrit -C $config -c | /root/integrit1.txt if [ $? = "1" ]; then (printf "To: $recipient\nSubject: Integrit found a change\n\n"); /bin/grep changed integrit1.txt | /usr/lib/sendmail -t || exit 1 fi can someone help me with that?? Thanks, alot |