diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-05-26 18:54:35 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-05-26 18:58:17 +0300 |
commit | 2a58cc2536845e477088b04c687dc2cede90dfa7 (patch) | |
tree | 589bd53599340c4790f32c7472fb75bd27c7bfc6 /etc/nextcloudpi-config.d/fail2ban.sh | |
parent | f0df477ac712136c9905804417b5161ac4ac10ef (diff) |
more checks fail2banv0.12.8
Diffstat (limited to 'etc/nextcloudpi-config.d/fail2ban.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/fail2ban.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/nextcloudpi-config.d/fail2ban.sh b/etc/nextcloudpi-config.d/fail2ban.sh index 91085e93..38edef6e 100644 --- a/etc/nextcloudpi-config.d/fail2ban.sh +++ b/etc/nextcloudpi-config.d/fail2ban.sh @@ -41,8 +41,11 @@ configure() { [[ $ACTIVE_ != "yes" ]] && { service fail2ban stop; update-rc.d fail2ban disable; return; } - touch /var/www/nextcloud/data/nextcloud.log - chown -R www-data /var/www/nextcloud/data + local BASEDIR=$( dirname "$NCLOG_" ) + [ -d $BASEDIR ] || { echo -e "directory $BASEDIR not found"; return 1; } + + sudo -u www-data touch $NCLOG_ || { echo -e "ERROR: user www-data does not have write permissions on $NCLOG_"; return 1; } + chown -R www-data $BASEDIR cd /var/www/nextcloud sudo -u www-data php occ config:system:set loglevel --value=2 |