diff syslog2iptables.conf.make @ 61:d80641be405b stable-1-0-15

add script to build syslog2iptables.conf
author Carl Byington <carl@five-ten-sg.com>
date Sat, 04 Oct 2014 10:01:32 -0700
parents
children cc01f2caff37
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syslog2iptables.conf.make	Sat Oct 04 10:01:32 2014 -0700
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+(
+    echo '// generated by syslog2iptables.conf.make'
+    echo ''
+    cat syslog2iptables.conf.top
+
+    for fn in /var/log/httpd/access*log; do
+        if [ -f "$fn" ]; then
+            echo "    file \"$fn\" {"
+            cat syslog2iptables.conf.httpd
+            echo "    };"
+        fi
+    done
+
+    cat syslog2iptables.conf.bottom
+) >syslog2iptables.conf
+