#!/bin/bash
#
# Takes effect after squid3 has been installed after upgrade from wheezy.
# The existing cache is reused.
#
if [ -f /usr/sbin/squid ] && [ -f /usr/sbin/squid3 ] ; then
    service squid3 stop
    service squid stop
    umount /var/spool/squid
    sed -i 's#/var/spool/squid#/var/spool/squid3#' /etc/fstab
    mount /var/spool/squid3
    service squid3 start
    apt-get -y purge squid squid-common
fi
