~ubuntu-branches/ubuntu/intrepid/clamav/intrepid-backports

« back to all changes in this revision

Viewing changes to debian/clamav-base.postrm

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2009-11-05 23:14:14 UTC
  • mfrom: (0.3.4 jaunty-proposed)
  • Revision ID: james.westby@ubuntu.com-20091105231414-qm9ppy5rowfqhseq
Tags: 0.95.3+dfsg-1ubuntu0.09.04~intrepid1
* Source backport for Intrepid from jaunty-proposed (LP: #473707)
  - Drop build-dep on libtommath-dev and use internal copy

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
case "$1" in
24
24
  purge)
25
 
  if [ -x "/usr/bin/ucf" ]; then
26
 
    UCFLIST="/etc/cron.d/clamav-daemon \
27
 
      /etc/clamav.conf \
28
 
      /etc/clamav/clamav.conf \
29
 
      /etc/clamav/clamd.conf \
30
 
      /var/lib/clamav/clamav.conf.*.md5"
31
 
    for i in $UCFLIST; do
 
25
  DATABASEDIR=/var/lib/clamav
 
26
  UCFLIST="/etc/cron.d/clamav-daemon \
 
27
    /etc/clamav.conf \
 
28
    /etc/clamav/clamav.conf \
 
29
    /etc/clamav/clamd.conf \
 
30
    /var/lib/clamav/clamav.conf.*.md5"
 
31
  for i in $UCFLIST; do
 
32
    if [ -x "/usr/bin/ucf" ]; then
32
33
      ucf -p $i || true
33
 
      if [ -e $i ]; then
34
 
        rm -f $i || true
35
 
      fi
36
 
    done
37
 
  fi
 
34
    fi
 
35
    if [ -e $i ]; then
 
36
      rm -f $i || true
 
37
    fi
 
38
  done
38
39
  rm -f /var/log/clamav/clamav.log* /etc/clamav/clamav.conf.dpkg-old /etc/clamav/clamd.conf.dpkg-old /etc/clamav/clamd.conf.ucf-old
39
40
  if [ -x "/usr/sbin/userdel" ]; then
40
41
    userdel clamav || true
43
44
    groupdel clamav || true
44
45
  fi
45
46
  rm -f /var/lib/clamav/*.md5sum || true
 
47
  rm -f $DATABASEDIR/main.cvd $DATABASEDIR/daily.cvd
46
48
  for dir in /etc/clamav/ /var/log/clamav /var/lib/clamav/; do
47
49
    if [ -d "$dir" ]; then
48
50
      rmdir "$dir" --ignore-fail-on-non-empty || true