Hi,On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield <kutulu@kutulu.org> wrote:The easiest way is to write a wrapper script; I have a few of them thatKaushal Shriyan wrote:
> Hi I have the following entry in the crontab
>
> MAILTO=systems@webaroo.com
> 0 18 * * * /home/kaushal/rsync_mysql.sh
>
> I want my subject line to be "hostxx:yyDB refresh daily"
>
> is there a way to do it
>
> Thanks and Regards
>
> Kaushal
>
do something like:
(
echo "From: songbird.jungle <root@songbird.jungle>"
echo "To: Michael Edenfield <kutulu@kutulu.org>"
echo "Subject: Portage Update Report"
echo ""
# do stuff here.
) | sendmail kutulu@kutulu.org
--
Thanks and Regards
I have two scripts file one is http://pastebin.com/m263e6f3c and http://pastebin.com/m175098db.
The requirement is run http://pastebin.com/m175098db script once the below line succeeds in the http://pastebin.com/m263e6f3c
if /usr/bin/rsync -av /var/lib/mysql host77:/var/lib/ > /tmp/rsync-${TIMESTAMP}.log 2>&1
then
/usr/bin/mailx -s "Success: host77 DB refresh daily" kaushal@example.com < /tmp/rsync-${TIMESTAMP}.log
I am not able to proceed
Kaushal