[Logcheck-devel] Bug#481353: Please add support for logcheck.logfiles.d

2016-02-14 Thread Vincas Dargis

Tags: patch

Hello,

I have attempted to implement logcheck.logfiles.d directory support, patch is 
attached.

>From 63c41f4748730d99effec68492a7b23fa55a5d90 Mon Sep 17 00:00:00 2001
From: Vincas Dargis 
Date: Sun, 14 Feb 2016 19:44:36 +0200
Subject: [PATCH] Add logcheck.logfiles.d support

Signed-off-by: Vincas Dargis 
---
 Makefile   |  2 ++
 docs/logcheck.sgml |  8 
 src/logcheck   | 23 ++-
 3 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 7acec16..acd5bb6 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ install:
 	install -m 2750 -d $(DESTDIR)/$(CONFDIR)/cracking.ignore.d
 	install -m 2750 -d $(DESTDIR)/$(CONFDIR)/violations.d
 	install -m 2750 -d $(DESTDIR)/$(CONFDIR)/violations.ignore.d
+	install -m 2750 -d $(DESTDIR)/$(CONFDIR)/logcheck.logfiles.d
 
 	# Install the scripts
 	install -m 755 src/logcheck $(DESTDIR)/$(SBINDIR)/
@@ -68,6 +69,7 @@ clean:
 	-rm -rf $(DESTDIR)/$(CONFDIR)/violations.d/
 	-rm -rf $(DESTDIR)/$(CONFDIR)/violations.ignore.d/
 	-rm -rf $(DESTDIR)/$(CONFDIR)/cracking.d/
+	-rm -rf $(DESTDIR)/$(CONFDIR)/logcheck.logfiles.d/
 	# Remove the statedir and it's contents
 	-rm -rf $(DESTDIR)/var/lib/logcheck
 
diff --git a/docs/logcheck.sgml b/docs/logcheck.sgml
index 27a3429..b15a31f 100644
--- a/docs/logcheck.sgml
+++ b/docs/logcheck.sgml
@@ -149,6 +149,13 @@ manpage.1: manpage.sgml
 
   
   
+-D DIR
+
+
+  Overrule default logfiles lists directory
+
+  
+  
 -m
 
 
@@ -239,6 +246,7 @@ manpage.1: manpage.sgml
 
 /etc/logcheck/logcheck.conf is the main configuration file.
 /etc/logcheck/logcheck.logfiles is the list of files to monitor.
+/etc/logcheck/logcheck.logfiles.d is the directory of lists of files to monitor.
 /usr/share/doc/logcheck-database/README.logcheck-database.gz for hints on how to write, test and maintain rules.
   
   
diff --git a/src/logcheck b/src/logcheck
index a8d2d02..7fa36f5 100755
--- a/src/logcheck
+++ b/src/logcheck
@@ -73,6 +73,7 @@ RULEDIR="/etc/logcheck"
 CONFFILE="/etc/logcheck/logcheck.conf"
 STATEDIR="/var/lib/logcheck"
 LOGFILES_LIST="/etc/logcheck/logcheck.logfiles"
+LOGFILES_LIST_D="/etc/logcheck/logcheck.logfiles.d"
 LOGFILE_FALLBACK="/var/log/syslog"
 LOGTAIL="/usr/sbin/logtail2"
 CAT="/bin/cat"
@@ -444,7 +445,7 @@ logoutput() {
 usage() {
 debug "usage: Printing usage and exiting"
 cat<___
Logcheck-devel mailing list
Logcheck-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/logcheck-devel

[Logcheck-devel] Bug#481353: Please add support for logcheck.logfiles.d

2008-05-15 Thread Michael Koch
Package: logcheck
Version: 1.2.63
Severity: wishlist


Please add support for logcheck.logfiles.d so packages can put files
there and add new logfiles for reviewing.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



___
Logcheck-devel mailing list
Logcheck-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/logcheck-devel