From 07913ff7f885dc0dc42b4e4247e26ca5c7255617 Mon Sep 17 00:00:00 2001 From: Roger Garcia Date: Thu, 24 Nov 2022 15:33:38 +0100 Subject: [PATCH] Added clamav configuration in nextcloud --- dd-ctl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dd-ctl b/dd-ctl index 1c612bc..d3cbb7b 100755 --- a/dd-ctl +++ b/dd-ctl @@ -331,7 +331,7 @@ setup_nextcloud(){ done # Install and enable NextCloud apps - for app in bruteforcesettings polls calendar spreed bbb mail ownpad onlyoffice; do + for app in bruteforcesettings polls calendar spreed bbb mail ownpad onlyoffice files_antivirus; do docker exec -i -u www-data dd-apps-nextcloud-app sh -s <<-EOF php occ --no-warnings app:install "${app}" php occ --no-warnings app:enable "${app}" @@ -422,6 +422,16 @@ setup_nextcloud(){ EOF + # ClamAV + docker exec -i -u www-data dd-apps-nextcloud-app sh -s <<-EOF + php occ --no-warnings config:app:set -n files_antivirus av_mode --value="daemon" + php occ --no-warnings config:app:set -n files_antivirus av_host --value="dd-apps-clamav" + php occ --no-warnings config:app:set -n files_antivirus av_port --value="3310" + php occ --no-warnings config:app:set -n files_antivirus av_infected_action --value="only_log" + php occ --no-warnings config:app:set -n files_antivirus av_stream_max_length --value="26214400" + php occ --no-warnings config:app:set -n files_antivirus av_max_file_size --value="-1" + EOF + # Allow nextcloud into other apps iframes # Content-Security-Policy: frame-ancestors 'self' *.$DOMAIN; docker exec dd-apps-nextcloud-app sed -i -e "/protected \\\$allowedFrameAncestors = \[/{n;s/\('\\\\\'self\\\\\'\)\('\)/\1 *.$DOMAIN\2/}" /var/www/html/lib/public/AppFramework/Http/ContentSecurityPolicy.php