mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 10:35:53 +02:00
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.
This commit is contained in:
@@ -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
|
||||
whitelist .*\.clamav.net
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user