nextcloud - add logic for BRUTEFORCE_PROTECTION

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2024-04-11 13:27:44 +02:00
parent 4fa148a2e9
commit a5aedd2ba3

View file

@ -498,6 +498,14 @@ php /var/www/html/occ maintenance:update:htaccess
# Revert dbpersistent setting to check if it fixes too many db connections # Revert dbpersistent setting to check if it fixes too many db connections
php /var/www/html/occ config:system:set dbpersistent --value=false --type=bool php /var/www/html/occ config:system:set dbpersistent --value=false --type=bool
if [ "$DISABLE_BRUTEFORCE_PROTECTION" = yes ]; then
php /var/www/html/occ config:system:set auth.bruteforce.protection.enabled --type=bool --value=false
php /var/www/html/occ config:system:set ratelimit.protection.enabled --type=bool --value=false
else
php /var/www/html/occ config:system:set auth.bruteforce.protection.enabled --type=bool --value=true
php /var/www/html/occ config:system:set ratelimit.protection.enabled --type=bool --value=true
fi
# Disallow creating local external storages when nothing was mounted # Disallow creating local external storages when nothing was mounted
if [ -z "$NEXTCLOUD_MOUNT" ]; then if [ -z "$NEXTCLOUD_MOUNT" ]; then
php /var/www/html/occ config:system:set files_external_allow_create_new_local --type=bool --value=false php /var/www/html/occ config:system:set files_external_allow_create_new_local --type=bool --value=false