Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Tuesday, March 19, 2024

Diff for scripts/shell/firewall/fw-universal.sh between version 2.89 and 2.91

version 2.89, 2012/02/11 19:06:20 version 2.91, 2012/02/14 22:52:12
Line 22 
Line 22 
 # Licensed under terms of GNU General Public License.  # Licensed under terms of GNU General Public License.
 # All rights reserved.  # All rights reserved.
 #  #
 # $Platon: scripts/shell/firewall/fw-universal.sh,v 2.88 2012-02-11 18:59:55 rajo Exp $  # $Platon: scripts/shell/firewall/fw-universal.sh,v 2.90 2012-02-11 19:38:51 rajo Exp $
 #  #
 # Changelog:  # Changelog:
 # 2003-10-24 - created  # 2003-10-24 - created
Line 1457  shaping_status()
Line 1457  shaping_status()
   
 add_banned_ip()  add_banned_ip()
 { # {{{  { # {{{
         echo "# `date '+%Y-%m-%d %X' ` - ${SSH_CLIENT:=local}" >> $DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf          echo "# `date '+%Y-%m-%d %X' `" >> $DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf
         TMPFILE=`mktemp -t fw-universal.sh-XXXXXX` || exit 1          TMPFILE=`mktemp -t fw-universal.sh-XXXXXX` || exit 1
         trap 'rm -f $TMPFILE' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15          trap 'rm -f $TMPFILE' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
         if [ -z "$*" ]; then          if [ -z "$*" ]; then
Line 1470  add_banned_ip()
Line 1470  add_banned_ip()
         fi          fi
         read_config_ips $TMPFILE >> $DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf          read_config_ips $TMPFILE >> $DEFAULT_FIREWALL_CONFIG_DIR/BANNED_IP.conf
         rm -f $TMPFILE          rm -f $TMPFILE
           # start with new firewalling rules
           $0 start
 } # }}}  } # }}}
   
 deploy_block()  deploy_block()
Line 1489  deploy_block()
Line 1491  deploy_block()
         done          done
         while read conn keyfile          while read conn keyfile
         do          do
            case "$conn" in                  case "$conn" in
                    ""|\#*)                          ""|\#*)
                            continue                                  continue
                            ;;                                  ;;
            esac                  esac
            print_info "Deploying to $conn ...";                  print_info "=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
            cat $TMPFILE | ssh -i $keyfile $conn $0 remote                  print_info "Deploying to $conn ...";
                   cat $TMPFILE | ssh -i $keyfile $conn $0 remote
         done < $DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list          done < $DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list
         rm -f $TMPFILE          rm -f $TMPFILE
 } # }}}  } # }}}
Line 1524  deploy_update()
Line 1527  deploy_update()
                                 continue                                  continue
                                 ;;                                  ;;
                 esac                  esac
            print_info "Updating $conn ...";  
            echo "update" | ssh -i $keyfile $conn $0 remote                  print_info "=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
                   print_info "Updating $conn ...";
                   echo "update" | ssh -i $keyfile $conn $0 remote
         done < $DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list          done < $DEFAULT_FIREWALL_CONFIG_DIR/deploy-servers.list
 } # }}}  } # }}}
   
Line 1539  remote()
Line 1544  remote()
                                 add_banned_ip $par                                  add_banned_ip $par
                                 ;;                                  ;;
                         update)                          update)
                                 echo "Updating..."                                  echo "Updating firewall scripts..."
                                 update                                  update
                                 ;;                                  ;;
                         ""|\#*)                          ""|\#*)

Legend:
Removed from v.2.89  
changed lines
  Added in v.2.91

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top