head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2012.03.28.21.10.24;	author jgh;	state Exp;
branches;
next	;


desc
@@


1.1
log
@- drop invalid post-deinstall target, and add pkg-deinstall script
- while here adjust install scripts

PR:	ports/166094
Submitted by:	jgh
Approved by:	maintainer timeout ( 14 days )
Feature safe:	yes
@
text
@#!/bin/sh

PATH=/bin:/usr/sbin
WSHOME=${PREFIX}/lib/abyssws

USER=abyssws
GROUP=${USER}

if [ "$2" = "DEINSTALL" ]; then

	if ! [ -x ${WSHOME} ] ; then
	    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
	fi

fi
@
