Can I run chkrootkit from cron?

Can I run chkrootkit from cron?

Yes. For example, to run chkrootkit every day at 3am and mail the output to root:

0 3 * * * (cd /path/to/chkrootkit; ./chkrootkit 2>&1 | mail -s "chkrootkit output" root)

Comments

/etc/cron.daily/chkrootkit.sh

[/etc/cron.daily]# cat chkrootkit.sh

---

#!/bin/sh
(
cd /var/ss/chkrootkit-0.49/
./chkrootkit
) | /bin/mail -s 'CHROOTKIT:hostname.info'  *****@gmail.com

---

chmod 700 /etc/cron.daily/chkrootkit.sh