diff --git a/debian/aptly-api.postrm b/debian/aptly-api.postrm new file mode 100755 index 0000000000..b583667d79 --- /dev/null +++ b/debian/aptly-api.postrm @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +# source debconf library +. /usr/share/debconf/confmodule + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + # only remove aptly-api user and its homedir on purge + if [ "${1}" = "purge" ] ; then + userdel -r aptly-api + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0