mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-15 03:14:23 +00:00
327c7bafad
PR: ports/85064 Submitted by: David Mazieres <dm+bugs+avenger@mailavenger.org> (maintainer) Approved by: pav (mentor)
35 lines
797 B
Bash
35 lines
797 B
Bash
#!/bin/sh
|
|
|
|
if [ -n "${PACKAGE_BUILDING}" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$2" != "POST-DEINSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
USER=avenger
|
|
GROUP=avenger
|
|
AVDIR=/var/spool/avenger
|
|
AVETC=/etc/avenger
|
|
|
|
PW=/usr/sbin/pw
|
|
|
|
if ${PW} groupshow "${GROUP}" >/dev/null 2>&1; then
|
|
echo
|
|
echo "If you're done with Mail Avenger permanently, delete the $GROUP group manually: pw groupdel ${GROUP}" | fmt
|
|
fi
|
|
|
|
if ${PW} usershow "${USER}" >/dev/null 2>&1; then
|
|
echo
|
|
echo "If you're done with Mail Avenger permanently, delete the $USER user manually: pw userdel ${USER}" | fmt
|
|
fi
|
|
|
|
for dir in "$AVETC" "$AVDIR"; do
|
|
if [ -d "$dir" ] && ! rmdir $dir 2>/dev/null; then
|
|
echo
|
|
echo "You may wish to investigate the contents of $dir and delete the directory if you're done with Mail Avenger permanently." | fmt
|
|
fi
|
|
echo
|
|
done
|