Add script to test logcheck ignore rule
authorJulien Valroff <julien@kirya.net>
Tue, 15 Mar 2016 13:04:36 +0000 (14:04 +0100)
committerJulien Valroff <julien@kirya.net>
Tue, 15 Mar 2016 13:04:36 +0000 (14:04 +0100)
test_logcheck_ignore_rule [new file with mode: 0755]

diff --git a/test_logcheck_ignore_rule b/test_logcheck_ignore_rule
new file mode 100755 (executable)
index 0000000..36a03bd
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if test -n "$1"
+then
+        sed -e 's/[[:space:]]*$//' /var/log/{syslog,auth.log} | egrep "$(sed -n $1p /etc/logcheck/ignore.d.server/local)"
+fi