Skip to content

Commit 1a0bffd

Browse files
Sébastien Delafondneolynx
authored andcommitted
postrm: remove aptly-api user and home directory on purge
1 parent 666b5c9 commit 1a0bffd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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)