On Tue, Mar 25, 2008 at 12:11 PM, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote:
Hi Collin,On Mon, Mar 24, 2008 at 11:22 PM, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote:HiOn Mon, Mar 24, 2008 at 9:13 PM, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote: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
I have combined the script http://pastebin.com/m77e0e752, is it ok
Thanks and Regards
Kaushal
I have http://pastebin.com/d65195b48, I want to know how much time it takes to execute the script,
I know the time command
{ time sudo /usr/bin/rsync -av /var/lib/mysql kaushal@host77:/var/lib/; } 2>/tmp/time.output
is there a way to call the time command inside the http://pastebin.com/d65195b48 script
Thanks and Regards
Kaushal