freebsd-ports/security/pam_abl/files/pkg-deinstall.in
Pav Lucistnik bf663cc26b The pam_abl provides auto blacklisting of hosts and users
responsible for repeated failed authentication attempts.

WWW: http://www.hexten.net/pam_abl/

PR:		ports/100635
Submitted by:	Petr Rehor <prehor@gmail.com>
2006-09-01 18:34:03 +00:00

38 lines
890 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
PATH=/bin:/usr/bin:/usr/sbin
case $2 in
DEINSTALL)
cd ${PKG_PREFIX}/etc || exit 1
cmp -s -z pam_abl.conf pam_abl.conf.sample && rm pam_abl.conf
rmdir %%PAMABLDB%% 2>/dev/null
;;
POST-DEINSTALL)
pam_files="$(grep -lR '^[^#]*pam_abl\.so' /etc/pam.d ${PKG_PREFIX}/etc/pam.d)"
echo "===> post-deinstallation information for $1:"
if [ -n "${pam_files}" ]; then
echo ""
echo " Warning: pam_able remain used for this services:"
for pam_file in ${pam_files}; do
echo " ${pam_file}"
done
fi
if [ -e ${PKG_PREFIX}/etc/pam_abl.conf -o -d %%PAMABLDB%% ]; then
echo ""
echo " To ease updates, the database directory and configuration"
echo " file modified by you were preserved."
echo ""
echo " Please remove them manually if you do not want to use"
echo " pam_abl any longer."
fi
echo ""
;;
*)
exit 64
;;
esac
exit 0