]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
squidclamav: Update squidclamav.conf to use and trust the proxy cache.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 23 Jun 2013 20:45:57 +0000 (22:45 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 2 Jul 2013 19:25:14 +0000 (21:25 +0200)
If squidclamav is already installed, the configuration will be saved and updated during
the upgrade process.

Reference #10367.

config/squidclamav/squidclamav.conf
lfs/squidclamav
src/paks/squidclamav/update.sh

index 19bffa0606d338fff91cecdcd106e5a7b8589879..2b8f5dc02eb95a8d2b138656b9bb32a3cc228734 100644 (file)
@@ -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
index 86255f837b0b982b56a862c5c2eace11251dc5a0..37c3ef268a48110cd1431de1c91ac1a9cada7d7c 100644 (file)
@@ -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"
 
index 95516021498f344f18c4a9abe187d50a7f238672..4b542164e87f8260a45804d6a19b185f26a7ceae 100644 (file)
@@ -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