diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2016-10-22 15:29:49 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-10-22 15:29:49 -0700 |
commit | 07df119193e9c1e6f3a2804e87b1c6ea4644f3d8 (patch) | |
tree | 6964a6da80ed136d50c24d8acd6e3b97b1c1dd20 /debian/keysafe-server.postrm | |
parent | 07e176af3cb36f751fe6a5466482cd5cbfd6b528 (diff) | |
download | keysafe-07df119193e9c1e6f3a2804e87b1c6ea4644f3d8.tar.gz |
improve postrm
Diffstat (limited to 'debian/keysafe-server.postrm')
-rwxr-xr-x | debian/keysafe-server.postrm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/debian/keysafe-server.postrm b/debian/keysafe-server.postrm index 2840c1b..1293d92 100755 --- a/debian/keysafe-server.postrm +++ b/debian/keysafe-server.postrm @@ -1,7 +1,14 @@ #!/bin/sh -deluser --system bitlbee || true -rm -rf /var/lib/bitlbee -# ^ deluser doesn't seem to do this for homedirs in /var +# ensure the server process has been killed before calling userdel(1) #DEBHELPER# + +# on a package purge, we nuke the keysafe user and the store of +# shards. Note that it would be a security risk to delete the user +# without also deleting the store of shards, so we leave both the user +# and the store intact when the package is merely removed +if [ "$1" = "purge" ]; then + userdel --remove keysafe + groupdel keysafe +fi |