]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/paks/squidclamav/update.sh
squidclamav: Update squidclamav.conf to use and trust the proxy cache.
[ipfire-2.x.git] / src / paks / squidclamav / update.sh
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