From f2da513f5a0f8a07f68e804fd0986fd99ffb1b6c Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sun, 10 Apr 2016 13:02:51 +0200 Subject: [PATCH] Fail2ban for owncloud should user STORAGE_ROOT instead of hardcoded path --- conf/fail2ban/jail.d/miab-owncloud.conf | 2 +- setup/system.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/fail2ban/jail.d/miab-owncloud.conf b/conf/fail2ban/jail.d/miab-owncloud.conf index 9328bd5d..edb3a949 100644 --- a/conf/fail2ban/jail.d/miab-owncloud.conf +++ b/conf/fail2ban/jail.d/miab-owncloud.conf @@ -2,6 +2,6 @@ enabled = true port = http,https filter = miab-owncloud -logpath = /home/user-data/owncloud/owncloud.log +logpath = STORAGE_ROOT/owncloud/owncloud.log maxretry = 20 findtime = 30 diff --git a/setup/system.sh b/setup/system.sh index 1673ba13..c1e9152b 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -299,4 +299,6 @@ cat conf/fail2ban/jail.local \ cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/ cp -f conf/fail2ban/jail.d/* /etc/fail2ban/jail.d/ +sed -i "s#STORAGE_ROOT#$STORAGE_ROOT#" /etc/fail2ban/jail.d/miab-owncloud.conf + restart_service fail2ban