summaryrefslogblamecommitdiff
path: root/mail/avenger/pkg-deinstall
blob: 9b1bcdb4f6fc13372548b74e5641aa13f463397b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                     
                  



                                                   
            












                                                                                                                                            
        
    
#!/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