From f7a617a02573dccce4713ce3448116d2bc173757 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sun, 23 Jun 2013 22:45:57 +0200 Subject: [PATCH 1/1] squidclamav: Update squidclamav.conf to use and trust the proxy cache. If squidclamav is already installed, the configuration will be saved and updated during the upgrade process. Reference #10367. --- config/squidclamav/squidclamav.conf | 9 ++++----- lfs/squidclamav | 2 +- src/paks/squidclamav/update.sh | 10 ++++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/config/squidclamav/squidclamav.conf b/config/squidclamav/squidclamav.conf index 19bffa060..2b8f5dc02 100644 --- a/config/squidclamav/squidclamav.conf +++ b/config/squidclamav/squidclamav.conf @@ -1,6 +1,5 @@ -#squid_ip 127.0.0.1 -#squid_port 3128 -proxy none +squid_ip 127.0.0.1 +squid_port 800 # logfile /var/log/squid/squidclamav.log redirect http://127.0.0.1:81/clwarn.cgi @@ -15,7 +14,7 @@ clamd_local /var/run/clamav/clamd maxsize 5000000 maxredir 30 timeout 60 -#trust_cache 1 +trust_cache 1 # # Do not scan standard HTTP images abort ^.*\.(ico|gif|png|jpg)$ @@ -37,4 +36,4 @@ abortcontent ^video\/x-flv$ abortcontent ^.*application\/x-mms-framed.*$ # # White list some sites -whitelist .*\.clamav.net \ No newline at end of file +whitelist .*\.clamav.net diff --git a/lfs/squidclamav b/lfs/squidclamav index 86255f837..37c3ef268 100644 --- a/lfs/squidclamav +++ b/lfs/squidclamav @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = squidclamav -PAK_VER = 15 +PAK_VER = 16 DEPS = "clamav" diff --git a/src/paks/squidclamav/update.sh b/src/paks/squidclamav/update.sh index 955160214..4b542164e 100644 --- a/src/paks/squidclamav/update.sh +++ b/src/paks/squidclamav/update.sh @@ -35,4 +35,14 @@ if [ "$VERSION" -lt "11" ]; then sed -e "s|logfile.*|logfile /var/log/squid/squidclamav.log|g" /etc/squidclamav.conf fi +if [ "$VERSION" -lt "16" ]; then + sed -e "s/proxy none//g" -i /etc/squidclamav.conf + sed -e "s/^#squid_ip 127\.0\.0\.1/squid_ip 127\.0\.0\.1/g" \ + -e "s/^#squid_port 3128/squid_port 800/g" \ + -e "s/^#trust_cache 1/trust_cache 1/g" -i /etc/squidclamav.conf + + # Regenerate configuration files. + perl /srv/web/ipfire/cgi-bin/proxy.cgi +fi + /etc/init.d/squid restart -- 2.39.2