allow to override use_stock_cfg values (used as default value now), e. g. actions rest filters only, reject d1afbb566f0304487b5d578b4aacef8e647ee74b

pull/2025/head
sebres 2018-01-22 13:18:32 +01:00
parent 3f51c158cd
commit 9af9ec25f5
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ def _start_params(tmp, use_stock=False, use_stock_cfg=None,
"""Filters list of 'files' to contain only directories (under dir)"""
return [f for f in files if isdir(pjoin(dir, f))]
shutil.copytree(STOCK_CONF_DIR, cfg, ignore=ig_dirs)
use_stock_cfg = ('action.d', 'filter.d')
if use_stock_cfg is None: use_stock_cfg = ('action.d', 'filter.d')
# replace fail2ban params (database with memory):
r = re.compile(r'^dbfile\s*=')
for line in fileinput.input(pjoin(cfg, "fail2ban.conf"), inplace=True):