PDA

View Full Version : How-To email the results of any cron job


eWebtricity
08-28-2005, 02:17 AM
Here is the script used to run the popular chkrootkit utility and email the results to the admin. Just append the syntax marked in red below to just about anything you run from cron and the output will be redirected to an email and sent to the address you specify.


/usr/local/src/chkrootkit-0.42b/chkrootkit 2>&1 | mail -s "Server1 chkrootkit output" sysadmin@domain.com (sysadmin@domain.com)