Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <github@hanssonit.se>2020-08-11 19:11:27 +0300
committerGitHub <noreply@github.com>2020-08-11 19:11:27 +0300
commit8721ea0c7c3ca283d34e200114f948d5fefb9845 (patch)
treefb2f45c6dff7ebdc72c4d85b4ff06166f2d2bcca /apps/fail2ban.sh
parentaef73c1cd4a1dae0d328a620d6bd859272679353 (diff)
also check if file exists
Diffstat (limited to 'apps/fail2ban.sh')
-rw-r--r--apps/fail2ban.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/fail2ban.sh b/apps/fail2ban.sh
index 047f42f7..4a529b53 100644
--- a/apps/fail2ban.sh
+++ b/apps/fail2ban.sh
@@ -63,7 +63,13 @@ while :
do
if [ "$(occ_command_no_check config:system:get logfile)" = "$VMLOGS/nextcloud.log" ]
then
- break
+ if [ -f "$VMLOGS/nextcloud.log" ]
+ then
+ chown www-data:www-data "$VMLOGS/nextcloud.log"
+ occ_command config:system:set log_type --value=file
+ occ_command config:system:set loglevel --value=2
+ break
+ fi
elif [ "$(occ_command_no_check config:system:get logfile)" != "" ]
then
# Set logging