Code

Added logging of IP address
[gosa.git] / gosa-core / debian / gosa.postrm
1 #! /bin/sh
2 # postrm script for GOsa
3 #
5 set -e
7 case "$1" in
8   purge|remove)
10         # Pure here
11         if [ "$1" = "purge" ] ; then
12           if [ -d /var/spool/gosa ] ; then
13             echo "Removing /var/spool/gosa as requested."
14             rm -Rf /var/spool/gosa
15           fi
16         fi
18         if [ -d /etc/apache2/conf.d ]; then
19           # Remove GOsa include
20           [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf
22           # Restart servers
23           if [ -x /usr/sbin/invoke-rc.d ]; then
24             invoke-rc.d apache2 restart
25           else
26             /etc/init.d/apache2 restart
27           fi
28         fi
30         if [ -d /etc/lighttpd/conf-available ]; then
31           # Remove GOsa include
32           [ -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ] && rm -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf
34           # Restart servers
35           if [ -x /usr/sbin/invoke-rc.d ]; then
36             invoke-rc.d lighttpd restart
37           else
38             /etc/init.d/lighttpd restart
39           fi
40         fi
41         
42         ;;
44   upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
45         ;;
47   *)
48         echo "postrm called with unknown argument \`$1'" >&2
49         exit 0
50         ;;
51 esac
53 #DEBHELPER#
55 exit 0