summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2015-06-11 19:43:42 -1000
committerYaroslav Halchenko <debian@onerussian.com>2015-06-11 19:43:42 -1000
commit2d9ece2d047cf42fb77b3b25e345ab44455218c1 (patch)
treeddd79b808e263ca2a5b68c0c376620aad9f22e37 /setup.py
parent345820d2aa83cc286704bb0560efc47827661dde (diff)
downloadfail2ban-2d9ece2d047cf42fb77b3b25e345ab44455218c1.tar.gz
BF: 'create' /var/run/fail2ban on systems with /var/run
Should overcome problems of some users installing using setup.py install
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 5f497a3e..339fa85e 100755
--- a/setup.py
+++ b/setup.py
@@ -77,6 +77,12 @@ if setuptools:
else:
setup_extra = {}
+data_files_extra = []
+if os.path.exists('/var/run'):
+ # if we are on the system with /var/run -- we are to use it for having fail2ban/
+ # directory there for socket file etc
+ data_files_extra += [('/var/run/fail2ban', '')]
+
# Get version number, avoiding importing fail2ban.
# This is due to tests not functioning for python3 as 2to3 takes place later
exec(open(join("fail2ban", "version.py")).read())
@@ -144,7 +150,7 @@ setup(
['README.md', 'README.Solaris', 'DEVELOP', 'FILTERS',
'doc/run-rootless.txt']
)
- ],
+ ] + data_files_extra,
**setup_extra
)