postrm is in dolibarr 3.3.4-3.
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 | #!/bin/sh
set -e
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
# Needs to be run outside of functions to have access to parameters
. /usr/share/apache2/apache2-maintscript-helper
fi
deconfigure_httpd() {
# Deconfigure apache 2
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null \
| awk '{print $3}' || true)
if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
apache2_invoke disconf dolibarr.conf || true
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ]; then
[ -L /etc/apache2/conf.d/dolibarr.conf ] && rm -f /etc/apache2/conf.d/dolibarr.conf
fi
# Deconfigure lighttpd
if which lighty-disable-mod >/dev/null 2>&1 ; then
lighty-disable-mod dolibarr || true
fi
}
case "$1" in
purge)
deconfigure_httpd
rm -f /etc/dolibarr/conf.php
rm -f /etc/dolibarr/mysql-credentials.php
rm -f /var/lib/dolibarr/documents/install.lock
# XXX: Do we want to remove all documents stored in
# /var/lib/dolibarr/documents/ ?
;;
remove)
deconfigure_httpd
;;
upgrade|remove|failed-upgrade|disappear|abort-install|abort-upgrade)
;;
esac
exit 0
|