#! /bin/sh

set -e

# Automatically added by dh_installinit/12.7ubuntu1
if [ "$1" = "purge" ] ; then
	update-rc.d c-icap remove >/dev/null
fi
# End automatically added section


if [ $1 = purge ]; then
    rm -rf /var/run/c-icap
    if [ -x "$(command -v deluser)" ]; then
      deluser --quiet --system c-icap > /dev/null || true
    else
      echo >&2 "not removing c-icap system account because deluser command was not found"
    fi
    if [ -x "$(command -v delgroup)" ]; then
      delgroup --quiet --system c-icap > /dev/null || true
    else
      echo >&2 "not removing c-icap group because delgroup command was not found"
    fi
fi

exit 0
