freebsd-ports/security/cyrus-sasl2-saslauthd/pkg-deinstall
2021-04-06 16:31:13 +02:00

28 lines
482 B
Bash

#!/bin/sh
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
remove_file()
{
file=$1
if cmp -s ${file} ${file}.tmp; then
rm -f ${file}
fi
rm -f ${file}.tmp
}
# This should really be uninstalled by Sendmail
sendmail_conf() {
if [ -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ]; then
echo "pwcheck_method: saslauthd" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp
remove_file ${PKG_PREFIX}/lib/sasl2/Sendmail.conf
fi
}
case $2 in
DEINSTALL)
sendmail_conf
;;
esac