[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about scripting
From: |
Callum Macdonald |
Subject: |
Re: Question about scripting |
Date: |
Wed, 24 Jul 2013 12:30:43 +0200 |
I'd suggest the simplest approach is probably to use `if failed then exec
script` and `if succeeded then exec script`, where the two scripts send the
email and then copy the file.
Cheers - Callum.
==
Callum Macdonald
www.callum-macdonald.com
For avoidance of doubt: This email does not constitute permission to add me to
your mailing list.
On 24 Jul 2013, at 01:01, Thorsten Kampe <address@hidden> wrote:
> Hi,
>
> I'd like to make a check-file-chksum action which does the following
>
> """
> check file FILE
> path /FILE
>
> if failed checksum
> then "send email with "diff /FILE /etc/monit/files/FILE" output in
> the body and /FILE attached to the email"
> else if succeeded then "cp /FILE /etc/monit/files/"
> """
>
> How would I have to approach this? Any hints?
>
> Thorsten
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general