postrm is in aide-common 0.15.1-5.
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 | #!/bin/sh
#
# post-removal script for AIDE
# A whole lot of this is "borrowed" from tripwire's postinst
#
set -e
if [ -n "$AIDEDEBUG" ]; then
echo "now debugging $0 $@"
set -x
fi
PKGNAME="aide"
# Make sure we should be running...
[ "$1" = "purge" ] || exit 0
UCF="ucf"
UCFR="ucfr"
if command -v ucfq >/dev/null; then
for file in $(ucfq --with-colons "$PKGNAME" | cut --delimiter=: --fields=1); do
for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do
rm -f ${file}$ext
done
rm -f ${file}
if command -v $UCF >/dev/null; then
$UCF --purge ${file}
fi
if command -v $UCFR >/dev/null; then
$UCFR --purge $PKGNAME ${file}
fi
done
else
echo >&2 "ucf no longer installed, not cleaning up"
fi
rm -f /var/lib/aide/aide.db /var/lib/aide/aide.db.new /var/lib/aide/aide.conf.autogenerated
for dir in /var/lib/aide /var/run/aide; do
if [ -d "$dir" ]; then
rmdir --ignore-fail-on-non-empty "$dir"
fi
done
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
|