diff options
author | Johan van Selst <johans@FreeBSD.org> | 2007-04-01 16:36:47 +0000 |
---|---|---|
committer | Johan van Selst <johans@FreeBSD.org> | 2007-04-01 16:36:47 +0000 |
commit | 8a30f7848325256cf02d425cff818ac00c13196f (patch) | |
tree | 0b6518252fff23f1ccdb1b0aafcd50f921097560 /games/wolfpack | |
parent | 670581fca343c7867708fd9bb05217e78255c8a2 (diff) | |
download | ports-8a30f7848325256cf02d425cff818ac00c13196f.tar.gz ports-8a30f7848325256cf02d425cff818ac00c13196f.zip |
Notes
Diffstat (limited to 'games/wolfpack')
-rw-r--r-- | games/wolfpack/pkg-deinstall | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/games/wolfpack/pkg-deinstall b/games/wolfpack/pkg-deinstall new file mode 100644 index 000000000000..6baf72fdb36f --- /dev/null +++ b/games/wolfpack/pkg-deinstall @@ -0,0 +1,41 @@ +#! /bin/sh + +PATH=/bin:/usr/bin:/usr/sbin +INSTDIR=${PKG_PREFIX}/share/wolfpack +DATADIR=${PKG_PREFIX}/var/wolfpack +CONFDIR=${PKG_PREFIX}/etc/wolfpack + +USER=wolfpack +GROUP=${USER} + +case $2 in +DEINSTALL) + if cmp -s ${CONFDIR}/econfig ${CONFDIR}/econfig.orig; then + rm -f ${CONFDIR}/econfig + fi + ;; + +POST-DEINSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + if pw groupdel ${GROUP}; then + echo "Removed group \"${GROUP}\"." + else + echo "Removing group \"${GROUP}\" failed..." + exit 1 + fi + else + echo "Group \"${GROUP}\" doesn't exist!" + fi + + if pw user show "${USER}" 2>/dev/null; then + if pw userdel ${USER}; then + echo "Removed user \"${USER}\"." + else + echo "Removing user \"${USER}\" failed..." + exit 1 + fi + else + echo "User \"${USER}\" doesn't exist!" + fi + ;; +esac |