Applied to git, thanks for contribution. Greetings
Hannes Kerstin Puschke wrote:
Look for header.txt and footer.txt in $RULEDIR instead of hardcoded /etc/logcheck This makes header.txt. and footer.txt customizable even if using a non-default rule directory. Signed-off-by: Kerstin Puschke <[email protected]> --- src/logcheck | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logcheck b/src/logcheck index 2bc0995..c23cd5f 100755 --- a/src/logcheck +++ b/src/logcheck @@ -188,8 +188,8 @@ EOF# Add an identification line at the beginning of the sent mailsetintro() { - if [ -f /etc/logcheck/header.txt -a -r /etc/logcheck/header.txt ] ; then - $CAT /etc/logcheck/header.txt >> "$TMPDIR/report" \ + if [ -f "$RULEDIR/header.txt" -a -r "$RULEDIR/header.txt" ] ; then + $CAT "$RULEDIR/header.txt" >> "$TMPDIR/report" \ || error "Could not append header to $TMPDIR/report." fi } @@ -197,8 +197,8 @@ setintro() {# Add a footer to the report.setfooter() { - if [ -f /etc/logcheck/footer.txt -a -r /etc/logcheck/footer.txt ] ; then - $CAT /etc/logcheck/footer.txt >> "$TMPDIR/report" \ + if [ -f "$RULEDIR/footer.txt" -a -r "$RULEDIR/footer.txt" ] ; then + $CAT "$RULEDIR/footer.txt" >> "$TMPDIR/report" \ || error "Could not append footer to $TMPDIR/report." fi }
_______________________________________________ Logcheck-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/logcheck-devel

