postrm is in gosa 2.7.4+reloaded1-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 | #! /bin/sh
# postrm script for GOsa
#
set -e
case "$1" in
purge)
if [ -d /var/spool/gosa ] ; then
echo "Removing /var/spool/gosa as requested."
rm -Rf /var/spool/gosa
fi
if [ -d /var/cache/gosa ] ; then
echo "Removing /var/cache/gosa as requested."
rm -Rf /var/cache/gosa
fi
[ -e /etc/gosa/gosa.secrets ] && rm /etc/gosa/gosa.secrets
[ -e /usr/share/gosa/html/themes/default/images/img.png ] && rm /usr/share/gosa/html/themes/default/images/img.png
[ -e /usr/share/gosa/ihtml/themes/default/img.styles ] && rm /usr/share/gosa/ihtml/themes/default/img.styles
find /usr/share/gosa -depth -type d -empty -exec rmdir "{}" \;
;;
remove)
if [ -d /etc/apache2/conf.d ]; then
# Remove GOsa include
[ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf
# Restart servers
if [ -x /usr/sbin/apache2 ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d apache2 restart
else
/etc/init.d/apache2 restart
fi
fi
fi
if [ -d /etc/lighttpd/conf-available ]; then
# Remove GOsa include
[ -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ] && rm -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf
# Restart servers
if [ -x /usr/sbin/lighttpd ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d lighttpd restart
else
/etc/init.d/lighttpd restart
fi
fi
fi
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 0
;;
esac
exit 0
|