changeset 37:e4eb969dfc4a

shutdown removes iptables entries that we added
author carl
date Thu, 08 Nov 2007 11:07:05 -0800
parents 6a2f26976898
children 26c29da3fbdf
files remote src/syslogconfig.cpp
diffstat 2 files changed, 3 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/remote	Thu Nov 08 10:52:56 2007 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-function me()
-{
-    a="$1"
-    b="$2"
-    echo "ssh $a $b"
-    ssh $a "$b"
-}
-
-T=`grep AM_INIT_AUTOMAKE configure.in | cut -d'(' -f2`
-NAME=`echo $T | cut -d, -f1`
-VER=`echo $T | cut -d, -f2 | cut -d')' -f1`
-BALL=$NAME-$VER.tar.gz
-web=/home/httpd/html/510sg/$NAME
-GZ=$web/packages/$BALL
-
-t='ams ns1 mbmg'
-for i in $t; do
-    echo " installing on $i"
-    scp $GZ $i:/tmp
-    me $i "cd /tmp; tar xfz $BALL"
-    me $i "cd /tmp/$NAME-$VER; ./configure"
-    me $i "cd /tmp/$NAME-$VER; make"
-    me $i "cd /tmp/$NAME-$VER; make install"
-    me $i "/etc/rc.d/init.d/$NAME stop"
-    me $i "/sbin/iptables -F INPUT"
-    me $i "cd /tmp/$NAME-$VER; make chkconfig"
-    me $i "ln --symbolic --force /etc/$NAME.conf /usr/local/etc/$NAME.conf"
-    me $i "/etc/rc.d/init.d/$NAME flush"
-    me $i "/etc/rc.d/init.d/$NAME start"
-
-    echo " install done on $i, press enter to continue"
-    read a
-done
--- a/src/syslogconfig.cpp	Thu Nov 08 10:52:56 2007 -0800
+++ b/src/syslogconfig.cpp	Thu Nov 08 11:07:05 2007 -0800
@@ -113,6 +113,9 @@
 
 
 void IPR::free_all(CONFIG &con) {
+    if (debug_syslog > 2) {
+        my_syslog("syslog2iptables shutting down");
+    }
     for (ip_buckets::iterator i=violations.begin(); i!=violations.end(); i++) {
         int    ip = (*i).first;
         bucket &b = (*i).second;