summaryrefslogtreecommitdiff
path: root/src/rpm/scripts/postremove
blob: 6dedc2984ce9eddab97dd77185528485415d866a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# only execute in case of package removal, not on upgrade
if [ $1 -eq 0 ] ; then

    getent passwd elasticsearch > /dev/null
    if [ "$?" == "0" ] ; then
        userdel elasticsearch
    fi

    getent group elasticsearch >/dev/null
    if [ "$?" == "0" ] ; then
        groupdel elasticsearch
    fi
fi

exit