Skip to content

Commit

Permalink
Merge pull request #1425 from aptly-dev/fix/debian-compliance
Browse files Browse the repository at this point in the history
postrm: remove aptly-api user and home directory on purge
  • Loading branch information
neolynx authored Jan 23, 2025
2 parents 666b5c9 + 1a0bffd commit cf3841e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions debian/aptly-api.postrm
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cf3841e

Please sign in to comment.