From 1a0bffdc518f74ee095e5c3a4e7ca8a903d6a907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= Date: Sat, 18 Jan 2025 08:39:09 +0100 Subject: [PATCH] postrm: remove aptly-api user and home directory on purge --- debian/aptly-api.postrm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 debian/aptly-api.postrm diff --git a/debian/aptly-api.postrm b/debian/aptly-api.postrm new file mode 100755 index 00000000..b583667d --- /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