#!/bin/sh
# $OpenBSD: DEINSTALL
#
# Stunnel de-installation

PATH=/bin:/usr/bin:/sbin:/usr/sbin
CONFIG_DIR=${SYSCONFDIR}/stunnel
CHROOT_DIR=/var/stunnel
STUNNELUSER=_stunnel
STUNNELGROUP=_stunnel

if [ ${PKG_DELETE_EXTRA} != Yes -a -d $CONFIG_DIR ]; then
	echo
	echo "+---------------"
	echo "| To completely deinstall the $1 package you need to perform"
	echo "| these steps as root (make sure stunnel is not running!):"
	echo "|"
	echo "|          userdel $STUNNELUSER"
	echo "|          groupdel $STUNNELGROUP"
	echo "|          rm -rf $CONFIG_DIR"
	echo "|          rm -rf $CHROOT_DIR"
	echo "|          rm /var/run/stunnel.pid"
	echo "|"
	echo "| Do not do this if you plan on re-installing $1"
	echo "| at some future time."
	echo "+---------------"
	echo
fi

exit 0
