aboutsummaryrefslogtreecommitdiffstats
path: root/www/httptunnel/pkg-deinstall
blob: b711522d0c7f297cc46f98dc3f1db151158a3799 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

case $2 in
POST-DEINSTALL)
    USER=httptunnel
    GROUP=${USER}
    PW=/usr/sbin/pw

    if ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
        if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
            echo "To delete the ${USER} group permanently, use '${PW} groupdel ${GROUP}'."
        else
            ${PW} groupdel ${USER}
        fi
    fi

    if ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
        if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
            echo "To delete the ${USER} user permanently, use '${PW} userdel ${USER}'."
        else
            ${PW} userdel ${USER}
        fi
    fi

    exit 0
    ;;
esac