File: postrm

package info (click to toggle)
krb5-strength 3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,112 kB
  • sloc: ansic: 8,236; sh: 4,977; perl: 1,528; makefile: 181
file content (23 lines) | stat: -rwxr-xr-x 652 bytes parent folder | download | duplicates (2)
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

# Purge the password history database and remove the _history user and group
# on package purge.  This user should not be used for any other purpose.
if [ "$1" = purge ]; then
    for file in history.db history.db.lock lengths.db lengths.db.lock; do
        rm -f "/var/lib/heimdal-history/$file"
    done
    deluser --quiet --system _history >/dev/null || true
fi

# Remove the directory for the password history database on remove if empty.
if [ "$1" = purge ] || [ "$1" = remove ]; then
    if [ -d /var/lib/heimdal-history ]; then
        rmdir --ignore-fail-on-non-empty /var/lib/heimdal-history
    fi
fi

#DEBHELPER#

exit 0