postrm is in htcondor 8.0.5~dfsg.1-1ubuntu1.
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 58 59 60 61 62 63 64 65 | #! /bin/sh
# postrm script for condor
set -e
condor_user=condor
condor_local_cfg=/etc/condor/condor_config.local
condor_debconf_cfg=/etc/condor/config.d/00debconf
remove_condor_dirs() {
# make an attempt to remove runtime data from the "standard" location
# this cannot deal with non-standard LOCALDIR settings
for dlabel in lib/condor spool/condor lock/condor log/condor run/condor; do
dname="/var/$dlabel"
if [ -d "$dname" ]; then
rm -rf $dname
fi
done
}
case "$1" in
remove|abort-install|disappear)
;;
purge)
# wipe out runtime data (logs, ...)
remove_condor_dirs
[ -f $condor_debconf_cfg ] && rm $condor_debconf_cfg
# unless the file has any non-comment purge it too
[ -f $condor_local_cfg ] \
&& [ "$(grep -v '^[#]' < $condor_local_cfg | wc -w)" = "0" ] \
&& rm $condor_local_cfg
# not removing the condor system user; see http://bugs.debian.org/621833
# for a discussion. also not trying to lock the condor user as it was
# configured with --disabled-login --disabled-password already
;;
upgrade|failed-upgrade|abort-upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
case "$1" in
purge|remove|abort-install|disappear)
# and remove links from rc?.d
update-rc.d condor remove >/dev/null || exit 0
;;
esac
# End automatically added section
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# 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
exit 0
|