webcit_before_automake is now the trunk
[citadel.git] / webcit / debian / citadel-webcit-apache.postrm
1 #! /bin/sh
2 # postrm.skeleton
3 # Skeleton maintainer script showing all the possible cases.
4 # Written by Charles Briscoe-Smith, March-June 1998.  Public Domain.
5 . /usr/share/debconf/confmodule
6
7 # Abort if any command returns an error value
8 set -e
9
10 # This script is called twice during the removal of the package; once
11 # after the removal of the package's files from the system, and as
12 # the final step in the removal of this package, after the package's
13 # conffiles have been removed.
14
15 # Ensure the menu system is updated
16 : [ ! -x /usr/bin/update-menus ] || /usr/bin/update-menus
17
18 case "$1" in
19   remove)
20     # This package is being removed, but its configuration has not yet
21     # been purged.
22         
23     ;;
24   purge)
25     # This package has previously been removed and is now having
26     # its configuration purged from the system.
27         # remove the gunzipped setup executable.
28         db_purge 'citadel/webserver'
29         db_purge 'citadel/baseurl'
30         ### TODO: remove citadel from inittab!
31     ;;
32   disappear)
33     if test "$2" != overwriter; then
34       echo "$0: undocumented call to \`postrm $*'" 1>&2
35       exit 0
36     fi
37     # This package has been completely overwritten by package $3
38     # (version $4).  All our files are already gone from the system.
39     # This is a special case: neither "prerm remove" nor "postrm remove"
40     # have been called, because dpkg didn't know that this package would
41     # disappear until this stage.
42     :
43
44     ;;
45   upgrade)
46     # About to upgrade FROM THIS VERSION to version $2 of this package.
47     # "prerm upgrade" has been called for this version, and "preinst
48     # upgrade" has been called for the new version.  Last chance to
49     # clean up.
50     :
51
52     ;;
53   failed-upgrade)
54     # About to upgrade from version $2 of this package TO THIS VERSION.
55     # "prerm upgrade" has been called for the old version, and "preinst
56     # upgrade" has been called for this version.  This is only used if
57     # the previous version's "postrm upgrade" couldn't handle it and
58     # returned non-zero. (Fix old postrm bugs here.)
59     :
60
61     ;;
62   abort-install)
63     # Back out of an attempt to install this package.  Undo the effects of
64     # "preinst install...".  There are two sub-cases.
65     :
66
67     if test "${2+set}" = set; then
68       # When the install was attempted, version $2's configuration
69       # files were still on the system.  Undo the effects of "preinst
70       # install $2".
71       :
72
73     else
74       # We were being installed from scratch.  Undo the effects of
75       # "preinst install".
76       :
77
78     fi ;;
79   abort-upgrade)
80     # Back out of an attempt to upgrade this package from version $2
81     # TO THIS VERSION.  Undo the effects of "preinst upgrade $2".
82     :
83
84     ;;
85   *) echo "$0: didn't understand being called with \`$1'" 1>&2
86      exit 0;;
87 esac
88
89 exit 0