#!/bin/sh
set -e

case "$1" in
    configure)
	if ! id jetty > /dev/null 2>&1 ; then
	    adduser --system --home /usr/share/jetty --no-create-home \
		--group --disabled-password --shell /bin/false \
		jetty
	fi
	chown -R jetty:adm /var/cache/jetty /var/log/jetty /var/lib/jetty
	chmod 750 /var/log/jetty
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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

#DEBHELPER#
