alternc.prerm 1.21 KB
Newer Older
1
#!/bin/bash -x
2 3 4 5 6 7

# Debian alternc prerm
# Benjamin Sonntag <benjamin@alternc.org>

case "$1" in
remove)
8 9 10
    # remove postfix from the sasl group (might not be user will though...)
    deluser --quiet postfix sasl || true

11 12 13 14 15 16
    #if [ -r "/etc/alternc/local.sh" ]
    #then
    #	. /etc/alternc/local.sh
    #else
    #	FQDN="`hostname --fqdn`"
    #fi
17
	
18
    FQDN_LETTER="`echo $FQDN | sed -e 's/.*\.\([^\.]\)[^\.]*\.[^\.]*$/\1/'`"
19 20 21 22 23 24
    #rm -rf /var/alternc/bureau/locales || true
    #rmdir -p /var/alternc/bureau 2> /dev/null || true
    #rm -f /var/alternc/dns/bureau || true
    #rm -f /var/alternc/dns/$FQDN_LETTER/$FQDN || true
    #rmdir -p /var/alternc/html/a/admin 2> /dev/null || true
    #rmdir -p /var/alternc/html/r/root 2> /dev/null || true
25 26 27 28 29 30
    ;;

upgrade)
    ;;

purge)
31 32 33 34 35
    #find /var/alternc/bureau/locales -type f -name "alternc.mo" -exec rm {} \;
    #find /var/alternc/bureau/locales -type f -name "alternc" -exec rm {} \;
    #rm /var/alternc/bureau/class/local.php
    #rm -f /var/alternc/apacheconf/bureau
    #rm -f /var/alternc/apacheconf/$FQDN_LETTER/$FQDN
36 37 38 39 40 41 42 43 44 45 46 47
    ;;

failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;

*)
    echo "postrm called with unknown argument '$1'" >&2
    exit 1
    ;;
esac

#DEBHELPER#