#!/bin/bash #------------------------------------------------------------------------------ # Copyright (c) 2005-2010 Olaf Jaehrling # # Creation: 13.02.2005 by Olaf Jaehrling # Last Update: 24.11.2010 by Olaf Jaehrling # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License #------------------------------------------------------------------------------ ### wgetversion wgetversion=`wget -V | head -1 | awk {'print $3'}` if [ "$wgetversion" = "1.9.1" ] then wgetoption='-q -O' else wgetoption='--no-check-certificate -q -O' fi if [ -f /usr/bin/editor ] then editor='/usr/bin/editor' else editor='vi' fi url='http://ojaehrling.de/eis/dl.php?l' if [ -f /var/install/packages/brute_force_blocking ] then version=`grep "" /var/install/packages/brute_force_blocking | sed 's###g'` wget $wgetoption /tmp/brute_force_blocking.tar.bz2.check $url/brute_force_blocking.tar.bz2.info version2=`grep "" /tmp/brute_force_blocking.tar.bz2.check | sed 's###g'` if [ "$version" = "$version2" ] then echo "your Version is up to date." echo "no update needed" rm -f /tmp/brute_force_blocking.tar.bz2.check exit 0 fi fi cd / echo "donwload newer version of brute_force_blocking" wget $wgetoption /brute_force_blocking.tar.bz2 $url./brute_force_blocking.tar.bz2 ### Downloadzaehler ### wget $wgetoption /tmp/brute_force_blocking.tar.bz2.info $url./debian/brute_force_blocking.tar.bz2.info rm -f /tmp/brute_force_blocking.tar.bz2.info ### End Downloadzaehler ### #### ttytter ### if [ ! -f /var/install/packages/ttytter ] then wget $wgetoption /ttytter.tar.bz2 $url./ttytter.tar.bz2 wget $wgetoption /tmp/ttytter.tar.bz2.info $url./debian/ttytter.tar.bz2.info rm -f /tmp/ttytter.tar.bz2.info tar xfj /ttytter.tar.bz2 sleep 2 rm -f /ttytter.tar.bz2 fi sleep 2 echo "expand BFB tar file" tar xfj brute_force_blocking.tar.bz2 echo "running updatescript" /var/install/config.d/brute_force_blocking-update.sh sleep 2 echo "remove obsolete files" rm -f /brute_force_blocking.tar.bz2 rm -f /tmp/preinstall.sh rm -f /tmp/install.sh rm -f /tmp/brute_force_blocking.tar.bz2.check $editor /etc/config.d/brute_force_blocking . /etc/config.d/brute_force_blocking if ["$START_BRUTE_FORCE_BLOCKING" = "yes" ] then echo "initialize and restart BFB" /var/install/config.d/brute_force_blocking.sh >/dev/null /etc/init.d/brute_force_blocking restart fi echo "brute_force_blocking update done" echo "For subsequent configuration edit /etc/config.d/brute_force_blocking" echo "and run '/var/install/config.d/brute_force_blocking.sh'."