#! /bin/sh
# postinst for whoopsie

set -e

case "$1" in
	configure)
		if ! getent passwd whoopsie >/dev/null; then
			adduser --disabled-password --quiet --system \
				--home / --no-create-home --group whoopsie
		fi
		chmod g+s /var/crash
		chgrp whoopsie /var/crash
		chgrp whoopsie /var/crash/*.crash
		chmod 0640 /var/crash/*.crash
	;;
	*)
		echo "postinst called with an unknown argument \`$1'" >&2
		exit 1
	;;
esac

#DEBHELPER#

exit 0
