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 <[email protected]> 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 -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
