#!/bin/sh
set -e

case "$1" in
  install)
    if ! getent group flarmclient >/dev/null; then
      addgroup --quiet --system flarmclient
    fi

    if ! getent passwd flarmclient >/dev/null; then
      adduser --system --ingroup flarmclient --home /var/spool/flarmclient \
        --gecos "flarmradar client" --shell /bin/sh flarmclient
    fi
    ;;

    upgrade|abort-upgrade)
        ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
        ;;
esac


exit 0
