| |||
| cron.daily bash scripting question I created the text file below, wrote it to /etc/cron.daily/aide and made it readable, writeable. and executable by root (same permissions as other scripts in /etc/cron.daily/). Is this all I need to do have this bash script run daily? Or do I need to edit some special cron file of some sort? Does the syntab look ok in this file? This is my first attempt at a cron job using a bash script. (email address is of course bogus). Any assistance appreciated. #!/bin/sh # Advanced Intrusion Detection System (aide) report /usr/bin/aide --check -V2 > /home/beowulf/aide-check.txt cat /home/beowulf/aide-check.txt | mailx -s "Report" me@wherever.com # End of file. |
| |||
| Re: cron.daily bash scripting question On Sun, 24 Dec 2006 10:20:13 -0600, Beowulf wrote: > I created the text file below, wrote it to /etc/cron.daily/aide and > made it readable, writeable. and executable by root (same permissions as > other scripts in /etc/cron.daily/). Is this all I need to do have this > bash script run daily? Should work. Want to test it, Try it, by hand /etc/cron.daily/aide then if you like, nice -n 19 run-parts --report /etc/cron.daily that is what crontab will do, see cat /etc/crontab > cat /home/beowulf/aide-check.txt | mailx -s "Report" me@wherever.com You might verify this works echo "test shot" > /home/beowulf/aide-check.txt mailx -s "Report" me@wherever.com < /home/beowulf/aide-check.txt You may want to add chown beowulf:beowulf /home/beowulf/aide-check.txt to your script. |
| |||
| Re: cron.daily bash scripting question On Sun, 24 Dec 2006 10:31:44 -0600, Bit Twister wrote: > Should work. Want to test it, Try it, by hand > /etc/cron.daily/aide > then if you like, > nice -n 19 run-parts --report /etc/cron.daily > that is what crontab will do, see cat /etc/crontab Thank you, I will try it when I get home (at coffee shop now with notebook pc) > You may want to add > chown beowulf:beowulf /home/beowulf/aide-check.txt to your script. Ok, thanks. |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mail program for IDS/cron? | Beowulf | Linux | 5 | 01-15-2007 12:01 PM |
| daily log of events | Shan | Windows XP | 1 | 01-04-2007 06:54 AM |
| daily log of events | Shan | Windows XP | 1 | 01-04-2007 06:54 AM |
| Attn: Ramesh or anyone (Question about scripting for Add/Remove Programs) | Trevor | Windows XP | 6 | 01-04-2007 04:00 AM |
| What is it like to use a Tablet PC on a daily basis? | LPH | Tablet PC Tips & Tricks | 1 | 04-06-2004 07:33 AM |