privoxy-log-parser: Highlight: "filtering request body from client 127.0.0.1 (size...
[privoxy.git] / debian / postrm
1 #! /bin/sh
2 # postrm script for privoxy
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
8 # summary of how this script can be called:
9 #        * <postrm> `remove'
10 #        * <postrm> `purge'
11 #        * <old-postrm> `upgrade' <new-version>
12 #        * <new-postrm> `failed-upgrade' <old-version>
13 #        * <new-postrm> `abort-install'
14 #        * <new-postrm> `abort-install' <old-version>
15 #        * <new-postrm> `abort-upgrade' <old-version>
16 #        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
17 # for details, see http://www.debian.org/doc/debian-policy/ or
18 # the debian-policy package
19
20
21 case "$1" in
22     purge)
23         # deluser --quiet privoxy
24         if [ -x "$(which ucf 2>/dev/null)" ]; then
25             ucf --purge /etc/privoxy/config
26         fi
27         if [ -x "$(which ucfr 2>/dev/null)" ]; then
28             ucfr --purge privoxy /etc/privoxy/config
29         fi
30         rm -rf /var/log/privoxy /etc/privoxy
31         if [ -e /usr/share/debconf/confmodule ]; then
32             . /usr/share/debconf/confmodule
33             db_purge
34         fi
35         # Remove https inspection certificates on purge:
36         if [ -d /var/lib/privoxy/certs ]; then
37             rm -rf /var/lib/privoxy/certs
38         fi
39         ;;
40
41     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
42         ;;
43
44     *)
45         echo "postrm called with unknown argument \`$1'" >&2
46         exit 1
47
48 esac
49
50 # dh_installdeb will replace this with shell code automatically
51 # generated by other debhelper scripts.
52
53 #DEBHELPER#
54
55 exit 0