summaryrefslogtreecommitdiffhomepage
path: root/debian/keysafe-server.postrm
blob: 1ee50af3fe808da5c064ce5f8897d35dba6987ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e

# ensure the server process has been killed before calling userdel(1)
#DEBHELPER#

# delete the _keysafe user and group, after chowning the shard storage
# to root so that it does not end up owned by another system user
if [ "$1" = "purge" ]; then
    chown -R root:root /var/lib/keysafe
    userdel _keysafe || true
    groupdel _keysafe || true
fi

# For the time being, at the request of upstream, we don't ever delete
# /var/lib/keysafe, even on a purge

# Deleting this data has the potential to destroy the backups of
# people's private keys, so it probably shouldn't ever happen
# automatically

# We might want to revisit this before uploading to sid