summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorCyril Jaquier <cyril.jaquier@fail2ban.org>2005-11-20 17:07:47 +0000
committerCyril Jaquier <cyril.jaquier@fail2ban.org>2005-11-20 17:07:47 +0000
commit840f6cd0520ea842111ebf1b638f96cc5f72f096 (patch)
treea8b23050afcba9a3e5be380d744bf3bdac90d289 /setup.py
parent07d127bebd604d0c1bd9574b0b0a31146727c74d (diff)
downloadfail2ban-840f6cd0520ea842111ebf1b638f96cc5f72f096.tar.gz
- Merged FAIL2BAN-0_5 with HEAD0.6.0
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@216 a942ae1a-1317-0410-a47c-b1dcaea8d605
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py58
1 files changed, 49 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index eee601bc..a4f096f3 100755
--- a/setup.py
+++ b/setup.py
@@ -28,15 +28,55 @@ __license__ = "GPL"
from distutils.core import setup
from version import version
+from os.path import isfile, join
+from sys import exit, argv
+
+longdesc = '''
+Fail2Ban scans log files like /var/log/pwdfail or
+/var/log/apache/error_log and bans IP that makes
+too many password failures. It updates firewall rules
+to reject the IP address or executes user defined
+commands.'''
setup(
- name = "fail2ban",
- version = version,
- description = "Ban IPs that make too many password failure",
- author = "Cyril Jaquier",
- author_email = "lostcontrol@users.sourceforge.net",
- url = "http://www.sourceforge.net/projects/fail2ban",
- scripts = ['fail2ban.py'],
- py_modules = ['version'],
- packages = ['firewall', 'logreader', 'confreader', 'utils']
+ name = "fail2ban",
+ version = version,
+ description = "Ban IPs that make too many password failure",
+ long_description = longdesc,
+ author = "Cyril Jaquier",
+ author_email = "lostcontrol@users.sourceforge.net",
+ url = "http://fail2ban.sourceforge.net",
+ license = "GPL",
+ platforms = "Posix",
+ scripts = ['fail2ban'],
+ py_modules = ['fail2ban', 'version'],
+ packages = ['firewall', 'logreader', 'confreader', 'utils']
)
+
+# Do some checks after installation
+# Search for obsolete files.
+obsoleteFiles = []
+elements = {"/usr/bin/": ["fail2ban.py"],
+ "/usr/lib/fail2ban/firewall/": ["iptables.py", "ipfwadm.py",
+ "ipfw.py"]}
+for dir in elements:
+ for f in elements[dir]:
+ path = join(dir, f)
+ if isfile(path):
+ obsoleteFiles.append(path)
+if obsoleteFiles:
+ print
+ print "Obsolete files from previous Fail2Ban versions were found on " \
+ "your system."
+ print "Please delete them:"
+ print
+ for f in obsoleteFiles:
+ print "\t" + f
+ print
+
+# Update config file
+if argv[1] == "install":
+ print
+ print "Please do not forget to update your configuration file."
+ print "Use config/fail2ban.conf.default as example."
+ print