#!/bin/sh -e

if [ "$1" = "configure" ]; then
  if ! getent group zorp >/dev/null 2>&1; then
    addgroup --quiet --system zorp
  fi

  if ! id zorp >/dev/null 2>&1; then
    adduser --quiet --system --no-create-home --ingroup zorp --home /var/lib/zorp zorp
  fi

  chown -R root:zorp /etc/zorp
  chmod 0750 /etc/zorp

fi

#DEBHELPER#
