File: nsd.postrm

package info (click to toggle)
nsd 4.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,188 kB
  • sloc: ansic: 64,639; sh: 4,523; python: 2,085; yacc: 1,344; makefile: 688
file content (24 lines) | stat: -rw-r--r-- 561 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
24
#!/bin/sh
set -e

#DEBHELPER#

if test "$1" = "purge"; then
    spool=/var/lib/nsd
    rm -f $spool/nsd.db $spool/ixfr.db $spool/xfrd.state
    rmdir $spool 2>/dev/null || true

    dpkg-statoverride --remove $spool >/dev/null 2>/dev/null || true

    # remove server/control keys on purge
    for f in nsd_control.key nsd_control.pem nsd_server.key nsd_server.pem; do
        rm -f "/etc/nsd/$f"
    done

    # delete nsd daemon user, if it exists
    if getent passwd nsd > /dev/null ; then
        deluser  --quiet nsd > /dev/null || true
    fi
fi

exit 0