From d10c4fd88561e3c9b211ac3ea854f7514d2e876f Mon Sep 17 00:00:00 2001 From: ajila-fmeyer Date: Fri, 7 Feb 2020 11:38:40 +0100 Subject: [PATCH] Adding variable for signature database checks per day --- Dockerfile | 3 ++- README.md | 1 + centos.Dockerfile | 3 ++- entrypoint.sh | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d51e072..8025085 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN sed -i 's/^#Foreground .*$/Foreground true/g' /etc/clamav/clamd.conf \ && sed -i 's/^#TCPSocket .*$/TCPSocket 3310/g' /etc/clamav/clamd.conf \ && sed -i 's/^#Foreground .*$/Foreground true/g' /etc/clamav/freshclam.conf -RUN freshclam --quiet --no-dns --checks=24 +RUN freshclam --quiet --no-dns # Build go package ADD . /go/src/clamav-rest/ @@ -43,5 +43,6 @@ ENV MAX_PARTITIONS=50 ENV MAX_ICONSPE=100 ENV PCRE_MATCHLIMIT=100000 ENV PCRE_RECMATCHLIMIT=2000 +ENV SIGNATURE_CHECKS=24 ENTRYPOINT [ "entrypoint.sh" ] \ No newline at end of file diff --git a/README.md b/README.md index 7d71f04..ed8b454 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ Below is the complete list of available options that can be used to customize yo | `MAX_ICONSPE` | How many Icons in PE to scan - Default `100` | | `PCRE_MATCHLIMIT` | Maximum PCRE Match Calls - Default `100000` | | `PCRE_RECMATCHLIMIT` | Maximum Recursive Match Calls to PCRE - Default `2000` | +| `SIGNATURE_CHECKS` | Check times per day for a new database signature. Must be between 1 and 50. - Default `24` | ## Networking diff --git a/centos.Dockerfile b/centos.Dockerfile index efe8b78..0e95fda 100644 --- a/centos.Dockerfile +++ b/centos.Dockerfile @@ -28,7 +28,7 @@ RUN sed -i 's/^Example$/# Example/g' /etc/clamd.d/scan.conf \ && sed -i 's/^#TCPSocket .*$/TCPSocket 3310/g' /etc/clamd.d/scan.conf \ && sed -i 's/^#Foreground .*$/Foreground true/g' /etc/freshclam.conf -RUN freshclam --quiet --no-dns --checks=24 +RUN freshclam --quiet --no-dns # Build go package ADD . /go/src/clamav-rest/ @@ -54,5 +54,6 @@ ENV MAX_PARTITIONS=50 ENV MAX_ICONSPE=100 ENV PCRE_MATCHLIMIT=100000 ENV PCRE_RECMATCHLIMIT=2000 +ENV SIGNATURE_CHECKS=24 ENTRYPOINT [ "entrypoint.sh" ] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 69e007e..cc39e53 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -16,7 +16,7 @@ sed -i 's/^#MaxIconsPE .*$/MaxIconsPE '"$MAX_ICONSPE"'/g' /etc/clamav/clamd.conf sed -i 's/^#PCREMatchLimit.*$/PCREMatchLimit '"$PCRE_MATCHLIMIT"'/g' /etc/clamav/clamd.conf sed -i 's/^#PCRERecMatchLimit .*$/PCRERecMatchLimit '"$PCRE_RECMATCHLIMIT"'/g' /etc/clamav/clamd.conf -freshclam -d & +freshclam --daemon --checks=$SIGNATURE_CHECKS & clamd & /usr/bin/clamav-rest &