postrm is in otrs2 3.3.5-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 58 59 60 61 62 63 64 65 66 67 | #!/bin/sh
set -e
CONFIGFILES="Kernel/Config.pm Kernel/Config/GenericAgent.pm"
. /usr/share/debconf/confmodule
purge_conffile(){
if [ -x /usr/bin/ucf ]; then
ucf --purge $1
fi
rm -f $1 $1.dpkg-* $1.ucf-*
}
if [ -e /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go otrs2 "$@"
fi
if [ "$1" = purge ]; then
deluser otrs || true
# Remove possible remainings from working as otrs user
rm -f /usr/share/otrs/.*history
# Remove log and tmp files
rm -rf /var/lib/otrs/log /var/lib/otrs/tmp /var/lib/otrs/packagesetup
rm -f /var/lib/otrs/httpd/htdocs/js/js-cache/*.js
rm -f /var/lib/otrs/httpd/htdocs/skins/Agent/default/css-cache/*.css
rm -f /var/lib/otrs/.debian-DBUpdate-to-3.1-flag
for FILE in $CONFIGFILES; do
purge_conffile /etc/otrs/$FILE
done
purge_conffile /etc/otrs/cron
purge_conffile /etc/otrs/fetchmailrc
purge_conffile /etc/otrs/database.pm
rm -rf /usr/share/otrs
rm -rf /var/lib/otrs/Config
rm -rf /run/otrs
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke disconf otrs2.conf
fi
fi
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d otrs2 remove >/dev/null
fi
# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
if [ -d /run/systemd/system ] ; then
systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# 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
if [ "$1" = purge ]; then
db_stop
fi
|