#!/bin/sh
set -e

case "$1" in
    remove)
	[ -f /etc/default/tomcat8 ] && . /etc/default/tomcat8
	[ -z "$TOMCAT8_USER" ] && TOMCAT8_USER="tomcat8"
	# Remove auth for tomcat8 to open privileged ports via authbind.
	TOMCAT_UID="`id -u $TOMCAT8_USER`"
	if [ -f "/etc/authbind/byuid/$TOMCAT_UID" ]; then
		rm -f /etc/authbind/byuid/$TOMCAT_UID
	fi
    ;;
esac

#DEBHELPER#
