-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4960 from nextcloud/enh/4918/fix-clamav
clamav - adjust max filesize conditionally
- Loading branch information
Showing
5 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# AIO settings | ||
MaxDirectoryRecursion 30 | ||
MaxFileSize 100M | ||
PCREMaxFileSize 100M | ||
StreamMaxLength 100M | ||
MaxFileSize 10G | ||
PCREMaxFileSize 10G | ||
StreamMaxLength 10G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Adjust settings | ||
cat /etc/clamav/clamd.conf > /tmp/clamd.conf | ||
CLAMAV_FILE="$(sed "s|10G|$MAX_SIZE|" /clamav.conf)" | ||
echo "$CLAMAV_FILE" >> /tmp/clamd.conf | ||
|
||
# Call initial init | ||
# shellcheck disable=SC2093 | ||
exec /init --config-file="/tmp/clamd.conf" | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters