freebsd-ports/www/squid32/pkg-deinstall
Florian Smeets 792ee326e5 - add www/squid32 [1]
- update www/libecap to 0.20 [2]
- remove option ECAP from www/squid31 and add a note to UPDATING that you need
  to upgrade to squid32 if you need ECAP

PR:		ports/173152 [1]
PR:		ports/173156 [2]
Submitted by:	Thomas-Martin Seck <tmseck@web.de>
Feature safe:	yes
2012-10-30 23:05:50 +00:00

49 lines
1.4 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
PATH=/bin:/usr/bin:/usr/sbin
squid_homedir="/var/squid"
squid_cache_basedir="${squid_homedir}/cache"
squid_state_basedir="${squid_homedir}/run"
squid_confdir=${PKG_PREFIX}/etc/squid
squid_logdir="/var/log/squid"
squid_rundir="/var/run/squid"
case $2 in
DEINSTALL)
cd ${squid_confdir} || exit 1
for f in cachemgr.conf errorpage.css mime.conf msntauth.conf squid.conf; do
cmp -s -z ${f} ${f}.default && rm ${f}
done
# try to cleanup directories in /var:
for d in ${squid_cache_basedir}/squid ${squid_cache_basedir} ${squid_state_basedir}/squid ${squid_state_basedir} ${squid_homedir} ${squid_logdir} ${squid_rundir}; do
rmdir ${d} 2>/dev/null
done
;;
POST-DEINSTALL)
echo "===> post-deinstallation information for $1:"
echo ""
echo " Note:"
echo " Squid related user accounts and groups were not removed."
echo ""
echo " To remove the 'squid' user and the 'squid' group which were"
echo " created by a default installation of this package, run"
echo ""
echo " pw userdel -n squid -u 100"
if [ -d ${squid_homedir} -o -d ${squid_confdir} -o -d ${squid_logdir} -o -d ${squid_rundir} ] ; then
echo ""
echo " In order to ease updates the cache and log directories"
echo " and all configuration files modified by you were preserved."
echo ""
echo " Please remove them manually if you do not want to use"
echo " Squid any longer."
fi
echo ""
;;
*)
exit 64
;;
esac
exit 0