diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-08-31 09:45:56 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-09-02 00:32:16 +0300 |
commit | 009c82e6cfb82cc40c49a9e253fe41bbbf779b13 (patch) | |
tree | 8213b20f68cfbe2941013eef540ec95a379bfb02 /etc/nextcloudpi-config.d/fail2ban.sh | |
parent | cfc759969a9f0afdde35689e7185d49533e6c78f (diff) |
shellcheck style fixesv0.24.12
Diffstat (limited to 'etc/nextcloudpi-config.d/fail2ban.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/fail2ban.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/nextcloudpi-config.d/fail2ban.sh b/etc/nextcloudpi-config.d/fail2ban.sh index d077fed8..54ac9ad2 100644 --- a/etc/nextcloudpi-config.d/fail2ban.sh +++ b/etc/nextcloudpi-config.d/fail2ban.sh @@ -42,15 +42,15 @@ configure() [[ $ACTIVE_ != "yes" ]] && { service fail2ban stop; update-rc.d fail2ban disable; return; } local BASEDIR=$( dirname "$NCLOG_" ) - [ -d $BASEDIR ] || { echo -e "directory $BASEDIR not found"; return 1; } + [ -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 + 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 sudo -u www-data php occ config:system:set log_type --value=file - sudo -u www-data php occ config:system:set logfile --value=$NCLOG_ + sudo -u www-data php occ config:system:set logfile --value="$NCLOG_" cat > /etc/fail2ban/filter.d/nextcloud.conf <<'EOF' [INCLUDES] |