]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/paks/squidclamav/update.sh
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
[people/teissler/ipfire-2.x.git] / src / paks / squidclamav / update.sh
index 89c40d0d7c5d3dd57b5944f3af4977d5f8d76760..4b542164e87f8260a45804d6a19b185f26a7ceae 100644 (file)
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+# Copyright (C) 2010 IPFire-Team <info@ipfire.org>.                        #
 #                                                                          #
 ############################################################################
 #
 . /opt/pakfire/lib/functions.sh
 ./uninstall.sh
-./install.sh
+extract_files
+
+VERSION=$(cat /opt/pakfire/db/installed/meta-squidclamav | grep Release | cut -d" " -f2)
+
+if [ "$VERSION" -gt "10" ]; then
+ restore_backup ${NAME}
+fi
+
+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