#!/bin/sh

set -e

case "$1" in
    configure)
        DBDIR='/var/lib/postgrey'

        getent passwd postgrey > /dev/null || \
            adduser --system --home "$DBDIR" --no-create-home \
                    --disabled-password --group postgrey

	chown postgrey:postgrey $DBDIR
    ;;
esac

#DEBHELPER#
