~ubuntu-branches/ubuntu/natty/ntop/natty

« back to all changes in this revision

Viewing changes to packages/debian.official/postrm

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-01-30 21:59:13 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050130215913-xc3ke963bw49b3k4
Tags: 2:3.0-5
* Updated README.Debian file so users will understand what to do at
  install, closes: #291794, #287802.
* Updated ntop init script to give better output.
* Also changed log directory from /var/lib/ntop to /var/log/ntop,
  closes: #252352.
* Quoted the interface list to allow whitespace, closes: #267248.
* Added a couple of logcheck ignores, closes: #269321, #269319.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
if [ "$1" = "purge" ] ; then
 
4
 
 
5
  # source debconf library
 
6
. /usr/share/debconf/confmodule
 
7
 
 
8
  INIT="/etc/ntop/init.cfg"
 
9
  if [ -f $INIT ] ; then
 
10
    # parse config file for user
 
11
. $INIT
 
12
 
 
13
    # remove user
 
14
    if grep -q ^$USER: /etc/passwd; then
 
15
      db_get ntop/createuser
 
16
      CREATEUSER=$RET
 
17
      if [ "$CREATEUSER" = "true" ]; then
 
18
        deluser $USER;
 
19
      fi
 
20
    fi
 
21
  fi
 
22
 
 
23
  # Remove init.cfg file and dir
 
24
  if [ -d /etc/ntop ] ; then
 
25
    rm -rf /etc/ntop;
 
26
  fi
 
27
  # remove stored data
 
28
  if [ -d /var/lib/ntop ] ; then
 
29
    rm -rf /var/lib/ntop;
 
30
  fi
 
31
  if [ -d /var/log/ntop ] ; then
 
32
    rm -rf /var/log/ntop;
 
33
  fi
 
34
 
 
35
  db_purge
 
36
 
 
37
  update-rc.d -f ntop remove >/dev/null
 
38
fi
 
39
 
 
40
 
 
41
#DEBHELPER#