Skip to content

Commit cf3841e

Browse files
authored
Merge pull request #1425 from aptly-dev/fix/debian-compliance
postrm: remove aptly-api user and home directory on purge
2 parents 666b5c9 + 1a0bffd commit cf3841e

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

debian/aptly-api.postrm

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# source debconf library
6+
. /usr/share/debconf/confmodule
7+
8+
case "$1" in
9+
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
10+
# only remove aptly-api user and its homedir on purge
11+
if [ "${1}" = "purge" ] ; then
12+
userdel -r aptly-api
13+
fi
14+
;;
15+
16+
*)
17+
echo "postrm called with unknown argument \`$1'" >&2
18+
exit 1
19+
;;
20+
esac
21+
22+
#DEBHELPER#
23+
24+
exit 0

0 commit comments

Comments
 (0)