#! /bin/sh
# $FreeBSD: www/openacs/files/pkg-deinstall.in 300897 2012-07-14 14:29:18Z beat $

if [ "$2" != "POST-DEINSTALL" ]; then
	exit 0
fi

OPENACS_USER=openacs
OPENACS_GROUP=openacs
OPENACSBASE=/usr/local/openacs

PW=/usr/sbin/pw

if ${PW} usershow "${OPENACS_USER}" 2>/dev/null 1>&2; then
	echo ""
	echo "To delete ${OPENACS_USER} user permanently, use the following command:"
	echo "${PW} userdel \"${OPENACS_USER}\""
fi
if ${PW} groupshow "${OPENACS_GROUP}" 2>/dev/null 1>&2; then
	echo ""
	echo "To delete ${OPENACS_GROUP} group permanently, use the following command:"
	echo "${PW} groupdel \"${OPENACS_GROUP}\""
fi
if test -d "${OPENACSBASE}"; then
	echo ""
	echo "Directory ${OPENACSBASE} is not empty, you may want to check its contents" 
	echo "and remove it manually."
fi
exit 0
