annotate syslog2iptables.conf.make @ 69:0e736950a117 stable-1-0-16

fix post uninstall script; allow config bucket count zero to disable a pattern
author Carl Byington <carl@five-ten-sg.com>
date Mon, 21 Dec 2015 07:56:18 -0800
parents d80641be405b
children cc01f2caff37
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 #!/bin/bash
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3 (
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4 echo '// generated by syslog2iptables.conf.make'
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 echo ''
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
6 cat syslog2iptables.conf.top
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
7
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
8 for fn in /var/log/httpd/access*log; do
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
9 if [ -f "$fn" ]; then
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10 echo " file \"$fn\" {"
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 cat syslog2iptables.conf.httpd
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 echo " };"
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
13 fi
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14 done
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16 cat syslog2iptables.conf.bottom
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 ) >syslog2iptables.conf
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18