From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Jdopt-0003U5-5S for garchives@archives.gentoo.org; Mon, 24 Mar 2008 15:43:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8BB6E0660; Mon, 24 Mar 2008 15:43:43 +0000 (UTC) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by pigeon.gentoo.org (Postfix) with ESMTP id 3BA40E0660 for ; Mon, 24 Mar 2008 15:43:43 +0000 (UTC) Received: by ug-out-1314.google.com with SMTP id j3so2057515ugf.49 for ; Mon, 24 Mar 2008 08:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=aKIov1jg4gq2z207hmywMhHsqzPEUY+CtsmrT0k4Pq4=; b=rSdN+Yg1WWfkST7cnx+b6/XxoQ6eroqoZV6RoEWHU20E3gkMwKO87JBywtd9FNWsigHMll9r+vumtVqBCs0JZKxKBtMLDN7El8K7Mz+QlLbgIep+F7rkJh+N1kmqLvekrPb5/cWFPNhqgkSX+T0S4Np01wsTW5uRcPxFmaXLXjs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dMyE9qt1g7pYWlcs3qrsPfFc2x1kx98gFbqB/xUmVDpZuTEZe4qQv3CXkJ05P6Z45NPcmIw5eBR9c4u+YJW5WMAVnic1//60cz1whSiq1huc4M4Qg63blA5/d8AbCm+aQoRWjrBvrcTpgGP3nHJdrOhYeeZfYDnGLd1IHLxgil8= Received: by 10.115.58.1 with SMTP id l1mr11915089wak.110.1206373421485; Mon, 24 Mar 2008 08:43:41 -0700 (PDT) Received: by 10.114.120.17 with HTTP; Mon, 24 Mar 2008 08:43:41 -0700 (PDT) Message-ID: <6b16fb4c0803240843n1e47c864m51d037238b0f61cf@mail.gmail.com> Date: Mon, 24 Mar 2008 21:13:41 +0530 From: "Kaushal Shriyan" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] crontab entry In-Reply-To: <47E7BAD1.3070307@kutulu.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10974_2834205.1206373421480" References: <6b16fb4c0803240204w227edc7ch894f5cd224ace0be@mail.gmail.com> <47E7BAD1.3070307@kutulu.org> X-Archives-Salt: b3446297-8c3e-40e2-9169-96408bf5175c X-Archives-Hash: c2ed532d06e3e12a8f223808d70b0e62 ------=_Part_10974_2834205.1206373421480 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield wrote: > Kaushal 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 > > > > The easiest way is to write a wrapper script; I have a few of them that > do something like: > > > ( > echo "From: songbird.jungle " > echo "To: Michael Edenfield " > echo "Subject: Portage Update Report" > echo "" > > # do stuff here. > > ) | sendmail kutulu@kutulu.org > > -- > gentoo-user@lists.gentoo.org mailing list > > Hi, 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 Thanks and Regards Kaushal ------=_Part_10974_2834205.1206373421480 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, Mar 24, 2008 at 7:59 PM, Mike Edenfield <kutulu@kutulu.org> wrote:
Kaushal 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
>

The easiest way is to write a wrapper script; I have a few of them that
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

--


Hi,

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

Thanks and Regards

Kaushal
------=_Part_10974_2834205.1206373421480-- -- gentoo-user@lists.gentoo.org mailing list