postrm is in postfix-cluebringer 2.0.10-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #!/bin/sh -e
CONFIG_FILE="/etc/cluebringer/clubringer.conf"
. /usr/share/debconf/confmodule
case "$1" in
remove)
;;
purge)
# Remove the config
if [ -f $CONFIG_FILE ]; then
echo "Removing config files ... "
# Remove the file
rm -rf $CONFIG_FILE >/dev/null 2>&1 || true
# Clean up UCF
#ucf --purge $CONFIG_FILE >/dev/null 2>&1 || true
#ucfr --purge postfix-cluebringer $CONFIG_FILE >/dev/null 2>&1 || true
fi
# Remove files and directories
update-rc.d postfix-cluebringer remove >/dev/null || exit $?
if [ -f /etc/default/cluebringer ]; then
rm /etc/default/cluebringer
fi
. /usr/share/debconf/confmodule
# If we are the last vestage of cluebringer remove user and group
cluebringer_status=$(dpkg -l postfix-cluebringer-webui | sed -n '$p' | awk '{print $1}')
if [ "$cluebringer_status" != "ii" ] || [ "$cluebringer_status" != "ip" ] || [ "$cluebringer_status" != "iB" ]; then
if getent passwd cluebringer >/dev/null ; then
echo "Removing cluebringer user and group ... "
deluser --system cluebrunger >/dev/null 2>&1 || true
fi
if getent group cluebringer >/dev/null ; then
delgroup --system cluebringer >/dev/null 2>&1 || true
fi
if [ -d "/etc/cluebringer" ]; then
echo "Removing directory /etc/cluebringer"
rm -rf /etc/cluebringer
fi
fi
;;
failed-upgrade|abort-install|abort-upgrade|disappear|upgrade)
;;
*)
echo "Postrm called with unknown argment '$@'"
exit 1;
;;
esac
exit 0;
|