#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.3 2003/10/09 15:39:33 sturm Exp $
#
# mailman de-installation

set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
MMHOME=$PREFIX/lib/mailman
MMSPOOL=/var/spool/mailman

if [ -d $MMHOME ]; then
    echo ""
    echo "+---------------"
    if [ "$PKG_DELETE_EXTRA" != Yes ]; then
        echo "| Your configuration file $MMHOME/Mailman/mm_cfg.py has"
        echo "| not been deleted. To completely deinstall the $1"
        echo "| package you need to perform these steps as root:"
        echo "|"
        echo "|   rmuser _mailman" 
        echo "|   rm -fr $MMSPOOL"
        echo "|"
        echo "| If you don't delete user _mailman, make sure to remove his crontab"
        echo "| entries with:"
        echo "|"
        echo "|   crontab -u _mailman -r"
    else
        echo "| Mailman has been deleted completely."
    fi
    echo "|"
    echo "| Don't forget to reverse the configuration changes to your webserver"
    echo "| and mailserver."
    echo "+---------------"
    echo ""
fi

exit 0
