#!/bin/sh
#
# $OpenBSD: DEINSTALL,v 1.9 2004/01/27 19:22:46 sturm Exp $
#

set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin

FILES='
leafnode/config
'

SPOOLDIR=/var/spool/news

if [ "$PKG_DELETE_EXTRA" == Yes ]
then
	/bin/rm -r $SPOOLDIR
fi

echo
echo "+--------------- $1"
echo "| To fully remove $1 from your system"

if [ "$PKG_DELETE_EXTRA" != Yes ] # else taken care of by pkg_delete -c
then
echo "| You should also remove the configuration files from the /etc/leafnode"
echo "| directory as well as the news spool directory ${SPOOLDIR}."
echo "|"
fi

echo "| You should also remove the '_news' user from the system by running:"
echo "|"
echo "|     userdel _news"
echo "|"
echo "| If you are planning on installing $1 again in the future"
echo "| you can leave them as they are."
if [ "$PKG_DELETE_EXTRA" != Yes ]
then
	echo "|"
	echo "| FYI, the following configuration files belong to this package:"
	echo "|"
	for f in ${FILES}; do
		echo "| /etc/$f"
	done
fi
echo "+--------------- $1"
echo

exit 0
