postinst is in pki-server 10.2.6+git20160317-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #!/bin/sh
set -e
OUT=/dev/null
VERSION=`dpkg-query -W pki-server | sed 's/.*\t//;s/-.*//'`
if [ "$1" = configure ]; then
    # lets give them a user/group in all cases.
    if ! getent passwd pkiuser  > $OUT; then
        adduser --quiet --system --home /var/lib/pki \
            --shell /usr/sbin/nologin --group \
            --no-create-home --gecos "CA System User" \
           pkiuser > $OUT
    fi
    if [ -n "$2" ]; then
        echo "Upgrading server at `/bin/date`." >> /var/log/pki/pki-server-upgrade-$VERSION.log 2>&1
        /usr/sbin/pki-server-upgrade --silent >> /var/log/pki/pki-server-upgrade-$VERSION.log 2>&1
        echo >> /var/log/pki/pki-server-upgrade-$VERSION.log 2>&1
    fi
fi
invoke_failure() {
    # invoke-rc.d failed, likely because no instance has been configured yet
    # but exit with an error if an instance is configured and the invoke failed
    if [ ! -d /etc/pki/pki-tomcat ]; then
        echo "... because no CA instance has been configured yet."
    else
        exit 1
    fi
}
# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
	pycompile -p pki-server 
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/pki-tomcatd" ]; then
		update-rc.d pki-tomcatd defaults >/dev/null
	fi
	if [ -x "/etc/init.d/pki-tomcatd" ] || [ -e "/etc/init/pki-tomcatd.conf" ]; then
		invoke-rc.d pki-tomcatd start || invoke_failure
	fi
fi
# End automatically added section
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
	systemctl --system daemon-reload >/dev/null || true
	deb-systemd-invoke start pki-tomcatd-nuxwdog.target pki-tomcatd.target >/dev/null || true
fi
# End automatically added section
 |