> Yes, basically. Except I don't want it mailing me at all if there is > not an error. I also want it mailing me on ANY error - in the rsync or > pre/post scripts.
We followed a typical "output=error" scenario.
We were running dirvish-runall with --quiet, so the only output there
was from dirvish itself when a vault or script failed.
However, we didn't want to have to track down what the error was when a
vault failed, so I set up a post-server script based on some ideas from
the wiki that would email what the dirvish error was. Here's the
relevant part:
# Return on success or warning if non-verbose mode
if [ $VERBOSE -eq 0 -a \( $DIRVISH_STATUS = "success" -o \
$DIRVISH_STATUS = "warning" \) ]; then
exit 0
fi
# Choose files to output
FILELIST="$DIRVISH_DEST/../summary"
if [ -f $DIRVISH_DEST/../rsync_error ]; then
FILELIST="$FILELIST $DIRVISH_DEST/../rsync_error"
fi
# Create email
cat $FILELIST | mail -s \
"Dirvish $DIRVISH_CLIENT: $DIRVISH_STATUS" \
$DSTADDR
Summary for this, which I think matches what you want, but YMMV:
* Run dirvish so that it only outputs on errors (causing cron mail).
This means "dirvish-runall --quiet" and no --summary option to "dirvish"
itself. This will give only general info, like "post-server failed" I
think.
* Have your scripts generate output on errors. This provides fuller
debugging for them.
* Use a post-server script as above to provide fuller dirvish debugging
info when needed.
Eric
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Dirvish mailing list [email protected] http://www.dirvish.org/mailman/listinfo/dirvish
